> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redpill.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses

> Create a model response using the Responses API format.

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](/guides/verify-a-response).

```bash theme={null}
POST https://api.redpill.ai/v1/responses
```

## Request Body

<ParamField body="model" type="string" required>
  Model id, for example `qwen/qwen3-30b-a3b-instruct-2507` or `openai/gpt-4o`.
</ParamField>

<ParamField body="input" type="string | array" required>
  The input prompt. A string, or an array of input items.
</ParamField>

<ParamField body="tools" type="array">
  Tool definitions the model may call.
</ParamField>

<ParamField body="temperature" type="number">
  Sampling temperature.
</ParamField>

<ParamField body="top_p" type="number">
  Nucleus sampling.
</ParamField>

<ParamField body="provider" type="object">
  Routing constraints for this request, applied together. `zdr` restricts routing to providers that
  do not retain content; `aci_verified` restricts it to an upstream verified inside the TEE;
  `aci_session_ids` pins it to specific attested channels.

  ```json theme={null}
  {"provider": {"aci_verified": true}}
  ```

  If no provider satisfies the constraints the request fails before the prompt is sent, and failover
  retries stay inside the allowed set. Field reference:
  [Chat Completions](/api-reference/chat-completions#body-provider). See
  [Attested routing](/guides/attested-routing) and
  [Zero data retention](/guides/zero-data-retention).
</ParamField>

## Example

```bash theme={null}
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

```json theme={null}
{
  "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.

## Related

<CardGroup cols={2}>
  <Card title="Chat Completions" icon="comments" href="/api-reference/chat-completions" />

  <Card title="Models" icon="list" href="/get-started/models" />
</CardGroup>
