Skip to main content
POST
/
responses
Responses
curl --request POST \
  --url https://api.redpill.ai/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": {},
  "tools": [
    {}
  ],
  "temperature": 123,
  "top_p": 123
}
'
Creates a model response using the Responses API request and response format. Like all inference endpoints, requests are served through the attested TEE gateway and return an x-receipt-id header for verification.
POST https://api.redpill.ai/v1/responses

Request Body

model
string
required
Model id, for example qwen/qwen3-30b-a3b-instruct-2507 or openai/gpt-4o.
input
string | array
required
The input prompt. A string, or an array of input items.
tools
array
Tool definitions the model may call.
temperature
number
Sampling temperature.
top_p
number
Nucleus sampling.

Example

curl https://api.redpill.ai/v1/responses \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o",
    "input": "Say hello in 3 words."
  }'

Response

{
  "id": "resp_023cda4f5e268c44006a30f3e0b6f4819b87536574ae6ecd14",
  "object": "response",
  "status": "completed",
  "model": "gpt-4o-2024-08-06",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        { "type": "output_text", "text": "Hello, howdy, hi!", "annotations": [] }
      ]
    }
  ],
  "usage": {
    "input_tokens": 14,
    "output_tokens": 8,
    "total_tokens": 22
  }
}
The output array contains items by type. A message item holds the assistant content; a reasoning item appears for reasoning models. Read assistant text from output[].content[].text on the message item.

Chat Completions

Models