Skip to main content
POST
/
v1
/
responses
curl --request POST \
  --url https://api.foxapi.cc/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-4o",
  "input": "Explain the design principles of RESTful APIs"
}
'
{
  "id": "resp-abc123",
  "object": "response",
  "created_at": 1757165031,
  "model": "<string>",
  "output": [
    {
      "type": "message",
      "id": "msg_abc123",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Hello! How can I help you today?"
        }
      ]
    }
  ],
  "status": "completed",
  "usage": {
    "input_tokens": 10,
    "output_tokens": 50,
    "total_tokens": 60
  }
}

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
required

Model name

Example:

"gpt-4o"

input
required

Text input or list of messages to generate a response for

stream
boolean
default:false

Whether to stream the response

temperature
number

Sampling temperature (0-2)

Required range: 0 <= x <= 2
max_output_tokens
integer

Maximum number of output tokens to generate

top_p
number

Nucleus sampling parameter (0-1)

Required range: 0 <= x <= 1
previous_response_id
string

The ID of a previous response to use as context for multi-turn conversations

instructions
string

System-level instructions that guide the model's behavior

tools
object[]

A list of tools the model may call

text
object

Configuration for structured text output

Response

Response API success

id
string

Unique response ID

Example:

"resp-abc123"

object
enum<string>

Object type

Available options:
response
created_at
integer

Creation timestamp

Example:

1757165031

model
string

Model used

output
object[]

List of output items

status
enum<string>

The status of the response

Available options:
completed,
failed,
in_progress,
cancelled
Example:

"completed"

usage
object

Token usage statistics