Skip to main content
POST
/
v1
/
responses
OpenAI Responses API
curl --request POST \
  --url https://api.ai.cc/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-4",
  "input": "Tell me a three sentence bedtime story about a unicorn."
}
'
{
  "id": "<string>",
  "object": "response",
  "created_at": 123,
  "status": "completed",
  "model": "<string>",
  "output": [
    {
      "type": "<string>",
      "id": "<string>",
      "status": "<string>",
      "role": "<string>",
      "content": [
        {
          "type": "<string>",
          "text": "<string>"
        }
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "prompt_tokens_details": {
      "cached_tokens": 123,
      "text_tokens": 123,
      "audio_tokens": 123,
      "image_tokens": 123
    },
    "completion_tokens_details": {
      "text_tokens": 123,
      "audio_tokens": 123,
      "reasoning_tokens": 123
    }
  }
}
This endpoint integrates a third-party model. For detailed parameter information, please refer to the official documentation at OpenAI Docs.

Authorizations

Authorization
string
header
required

Authentication is done using Bearer Token. Format: Authorization: Bearer sk-xxxxxx

Body

application/json
model
string
required

Model ID used to generate the response

input

input: string or array

instructions
string

A system (or developer) message inserted into the model's context.

max_output_tokens
integer

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.

temperature
number

What sampling temperature to use, between 0 and 2.

top_p
number

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.

stream
boolean

If set to true, the model response data will be streamed to the client as it is generated using server-sent events.

tools
object[]
tool_choice
reasoning
object
previous_response_id
string

The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.

truncation
enum<string>
Available options:
auto,
disabled

Response

200 - application/json

Successfully created response

id
string
object
string
Example:

"response"

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