Crear respuesta (API Responses de OpenAI)
post/v1/responses
Crea una respuesta del modelo a través de la API Responses de OpenAI. Se admiten conversaciones de varios turnos, llamadas a herramientas y razonamiento.
Autenticación
Envía tu clave de API de OLETOKEN como token Bearer. Las claves se crean en la página Claves de API de la consola.
Authorization: Bearer $OLETOKEN_API_KEYCuerpo de la solicitud
Content-Type:application/json
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| model | string | — | |
| input | string | object[] | — | La entrada, ya sea una cadena o un array de mensajes |
| instructions | string | — | — |
| max_output_tokens | integer | — | — |
| temperature | number | — | — |
| top_p | number | — | — |
| stream | boolean | — | — |
| tools | object[] | — | — |
| tool_choice | string | object | — | — |
| reasoning | object | — | — |
| effort | stringlowmediumhigh | — | — |
| summary | string | — | — |
| previous_response_id | string | — | — |
| truncation | stringautodisabled | — | — |
Respuestas
200Respuesta creada
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string | — | — |
| object | string | — | — |
| created_at | integer | — | — |
| status | stringcompletedfailedin_progressincomplete | — | — |
| model | string | — | — |
| output | object[] | — | — |
| type | string | — | — |
| id | string | — | — |
| status | string | — | — |
| role | string | — | — |
| content | object[] | — | — |
| type | string | — | — |
| text | string | — | — |
| usage | Usage | — | — |
| prompt_tokens | integer | — | Número de tokens del prompt |
| completion_tokens | integer | — | Número de tokens de completación |
| total_tokens | integer | — | Número total de tokens |
| prompt_tokens_details | object | — | — |
| cached_tokens | integer | — | — |
| text_tokens | integer | — | — |
| audio_tokens | integer | — | — |
| image_tokens | integer | — | — |
| completion_tokens_details | object | — | — |
| text_tokens | integer | — | — |
| audio_tokens | integer | — | — |
| reasoning_tokens | integer | — | — |
Solicitud de ejemplo
curl -X POST 'https://api.oletoken.ai/v1/responses' \
-H "Authorization: Bearer $OLETOKEN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "string"
}'
