Référence des structures de données
Les structures de données de requête / réponse ci-dessous sont générées automatiquement à partir de la spécification OpenAPIOpenAPISpécification ouverte décrivant les API REST (anciennement Swagger). Les structures de données de Lurus sont générées automatiquement à partir de la spécification OpenAPI de la passerelle.En savoir plus → de newapi (relay.json) et restent toujours cohérentes avec l’implémentation de la passerelle. La liste complète des points de terminaison figure dans l'aperçu de l’API, et des exemples d’appels dans Chat Completions.
Comment mettre à jour
La zone marquée <!-- sync:schemas --> de cette page est régénérée par bun run sync à partir de 2b-svc-newapi/docs/openapi/relay.json ; merci de ne pas modifier cette zone manuellement.
35 structures de données au total (générées automatiquement à partir de la spécification OpenAPI).
AudioTranscriptionResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
text | string | — |
ChatCompletionRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | ID du modèle |
messages | array<Message> | oui | Liste des messages de la conversation |
temperature | number | — | Température d’échantillonnage |
top_p | number | — | Paramètre d’échantillonnage par noyau (nucleus sampling) |
n | integer | — | Nombre de générations |
stream | boolean | — | Réponse en flux (streaming) ou non |
stream_options | object | — | |
stop | string | array<string> | — | Séquences d’arrêt |
max_tokens | integer | — | Nombre maximal de tokens générés |
max_completion_tokens | integer | — | Nombre maximal de tokens de complétion |
presence_penalty | number | — | |
frequency_penalty | number | — | |
logit_bias | object | — | |
user | string | — | |
tools | array<Tool> | — | |
tool_choice | string (none / auto / required) | object | — | |
response_format | ResponseFormat | — | |
seed | integer | — | |
reasoning_effort | string (low / medium / high) | — | Intensité de raisonnement (pour les modèles prenant en charge le raisonnement) |
modalities | array<string (text / audio)> | — | |
audio | object | — |
ChatCompletionResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
object | string | — | |
created | integer | — | |
model | string | — | |
choices | array<object> | — | |
usage | Usage | — | |
system_fingerprint | string | — |
ClaudeMessage
| Champ | Type | Requis | Description |
|---|---|---|---|
role | string (user / assistant) | oui | |
content | string | array<object> | oui |
ClaudeRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | |
messages | array<ClaudeMessage> | oui | |
system | string | array<object> | — | |
cache_control | object | — | |
inference_geo | string | — | |
max_tokens | integer | oui | |
temperature | number | — | |
top_p | number | — | |
top_k | integer | — | |
stream | boolean | — | |
stop_sequences | array<string> | — | |
tools | array<object> | — | |
tool_choice | object | — | |
thinking | object | — | |
context_management | object | — | |
output_config | object | — | |
output_format | object | — | |
container | string | object | — | |
mcp_servers | array<object> | — | |
metadata | object | — | |
speed | string (standard / fast) | — | |
service_tier | string (auto / standard_only) | — |
ClaudeResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
type | string | — | |
role | string | — | |
content | array<object> | — | |
model | string | — | |
stop_reason | string (end_turn / max_tokens / stop_sequence / tool_use) | — | |
usage | object | — |
CompletionRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | |
prompt | string | array<string> | oui | |
max_tokens | integer | — | |
temperature | number | — | |
top_p | number | — | |
n | integer | — | |
stream | boolean | — | |
stop | string | array<string> | — | |
suffix | string | — | |
echo | boolean | — |
CompletionResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
object | string | — | |
created | integer | — | |
model | string | — | |
choices | array<object> | — | |
usage | Usage | — |
EmbeddingRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | |
input | string | array<string> | oui | Texte à plonger (embedding) |
encoding_format | string (float / base64) | — | |
dimensions | integer | — | Dimension du vecteur de sortie |
EmbeddingResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
object | string | — | |
data | array<object> | — | |
model | string | — | |
usage | object | — |
GeminiModelsResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
models | array<object> | — |
GeminiResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
candidates | array<object> | — | |
usageMetadata | object | — |
ImageResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
created | integer | — | |
data | array<object> | — |
Message
| Champ | Type | Requis | Description |
|---|---|---|---|
role | string (system / user / assistant / tool / developer) | oui | Rôle du message |
content | string | array<MessageContent> | oui | Contenu du message |
name | string | — | Nom de l’expéditeur |
tool_calls | array<ToolCall> | — | |
tool_call_id | string | — | ID de l’appel d’outil (pour les messages de rôle tool) |
reasoning_content | string | — | Contenu de raisonnement |
MessageContent
| Champ | Type | Requis | Description |
|---|---|---|---|
type | string (text / image_url / input_audio / file / video_url) | — | |
text | string | — | |
image_url | object | — | |
input_audio | object | — | |
file | object | — | |
video_url | object | — |
Model
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | ID du modèle |
object | string | — | Type d’objet |
created | integer | — | Horodatage de création |
owned_by | string | — | Propriétaire du modèle |
ModelsResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
object | string | — | |
data | array<Model> | — |
ModerationRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
input | string | array<string> | oui | |
model | string | — |
ModerationResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
model | string | — | |
results | array<object> | — |
RerankRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | |
query | string | oui | Texte de la requête |
documents | array<string | object> | oui | Liste des documents à reclasser |
top_n | integer | — | Renvoyer les N premiers résultats |
return_documents | boolean | — |
RerankResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
results | array<object> | — | |
meta | object | — |
ResponseFormat
| Champ | Type | Requis | Description |
|---|---|---|---|
type | string (text / json_object / json_schema) | — | |
json_schema | object | — | Définition JSON Schema |
ResponsesCompactionRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | |
input | string | array<object> | — | Contenu d’entrée, qui peut être une chaîne ou un tableau de messages |
instructions | string | — | |
previous_response_id | string | — |
ResponsesCompactionResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
object | string | — | |
created_at | integer | — | |
output | array<object> | — | |
usage | Usage | — | |
error | object | — |
ResponsesRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | |
input | string | array<object> | — | Contenu d’entrée, qui peut être une chaîne ou un tableau de messages |
instructions | string | — | |
max_output_tokens | integer | — | |
temperature | number | — | |
top_p | number | — | |
stream | boolean | — | |
tools | array<object> | — | |
tool_choice | string | object | — | |
reasoning | object | — | |
previous_response_id | string | — | |
truncation | string (auto / disabled) | — |
ResponsesResponse
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
object | string | — | |
created_at | integer | — | |
status | string (completed / failed / in_progress / incomplete) | — | |
model | string | — | |
output | array<object> | — | |
usage | Usage | — |
SpeechRequest
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | oui | |
input | string | oui | Texte à convertir |
voice | string (alloy / echo / fable / onyx / nova / shimmer) | oui | |
response_format | string (mp3 / opus / aac / flac / wav / pcm) | — | |
speed | number | — |
Tool
| Champ | Type | Requis | Description |
|---|---|---|---|
type | string | — | |
function | object | — |
ToolCall
| Champ | Type | Requis | Description |
|---|---|---|---|
id | string | — | |
type | string | — | |
function | object | — |
Usage
| Champ | Type | Requis | Description |
|---|---|---|---|
prompt_tokens | integer | — | Nombre de tokens du prompt |
completion_tokens | integer | — | Nombre de tokens de complétion |
total_tokens | integer | — | Nombre total de tokens |
prompt_tokens_details | object | — | |
completion_tokens_details | object | — |
VideoRequest
Requête de génération de vidéo
| Champ | Type | Requis | Description |
|---|---|---|---|
model | string | — | ID du modèle / style |
prompt | string | — | Prompt de description textuelle |
image | string | — | Image en entrée (URL ou Base64) |
duration | number | — | Durée de la vidéo (secondes) |
width | integer | — | Largeur de la vidéo |
height | integer | — | Hauteur de la vidéo |
fps | integer | — | Fréquence d’images de la vidéo |
seed | integer | — | Graine aléatoire |
n | integer | — | Nombre de vidéos générées |
response_format | string | — | Format de réponse |
user | string | — | Identifiant de l’utilisateur |
metadata | object | — | Paramètres étendus (par ex. negative_prompt, style, quality_level, etc.) |
VideoResponse
Réponse à la soumission d’une tâche de génération de vidéo
| Champ | Type | Requis | Description |
|---|---|---|---|
task_id | string | — | ID de la tâche |
status | string | — | État de la tâche |
VideoTaskError
Informations d’erreur d’une tâche vidéo
| Champ | Type | Requis | Description |
|---|---|---|---|
code | integer | — | Code d’erreur |
message | string | — | Message d’erreur |
VideoTaskMetadata
Métadonnées d’une tâche vidéo
| Champ | Type | Requis | Description |
|---|---|---|---|
duration | number | — | Durée réelle de la vidéo générée |
fps | integer | — | Fréquence d’images réelle |
width | integer | — | Largeur réelle |
height | integer | — | Hauteur réelle |
seed | integer | — | Graine aléatoire utilisée |
VideoTaskResponse
Réponse à la consultation de l’état d’une tâche vidéo
| Champ | Type | Requis | Description |
|---|---|---|---|
task_id | string | — | ID de la tâche |
status | string (queued / in_progress / completed / failed) | — | État de la tâche |
url | string | — | URL de la ressource vidéo (en cas de succès) |
format | string | — | Format de la vidéo |
metadata | VideoTaskMetadata | — | |
error | VideoTaskError | — |