Passer au contenu principal
POST
/
v1
/
responses
Créer une réponse (OpenAI Responses API)
curl --request POST \
  --url https://api.aiid.edu.kg/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-image-2-2k",
  "input": "生成一张 2K 横屏产品海报,白色运动鞋,干净棚拍光线,高级商业摄影风格。",
  "stream": false,
  "tools": [
    {
      "type": "image_generation"
    }
  ],
  "background": true
}
'
{
  "id": "resp_xxx",
  "created_at": 1780649146,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "metadata": {
    "task_id": "010c31178d26436ca6194cde07931b33",
    "credits": "23"
  },
  "model": "gpt-image-2-2k",
  "object": "response",
  "output": [],
  "parallel_tool_calls": true,
  "temperature": null,
  "tool_choice": null,
  "tools": null,
  "top_p": null,
  "max_output_tokens": null,
  "previous_response_id": null,
  "reasoning": null,
  "status": "queued",
  "text": null,
  "truncation": null,
  "usage": null,
  "user": null,
  "store": null
}

Autorisations

Authorization
string
header
requis

Utilisez l'authentification Bearer Token. Format : Authorization: Bearer sk-xxxxxx

Corps

application/json

The body is of type object.

Réponse

200 - application/json

Réponse de création réussie

id
string
object
string
Exemple:

"response"

created_at
integer
status
enum<string>
Options disponibles:
completed,
failed,
in_progress,
incomplete
model
string
output
object[]
usage
object