# Responses

> POST /v1/responses in the OpenAI Responses format, used by Codex and OpenClaw.

```http
POST https://api.vikey.ai/v1/responses
```

Same format as the [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses). Codex and OpenClaw (with `openai-responses`) use this endpoint. Every text model on Vikey can be called through it.

## Example

```bash
curl https://api.vikey.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-6.1-sol",
    "instructions": "Answer briefly.",
    "input": "What is the difference between let and const in JavaScript?"
  }'
```

## Common parameters

| Parameter | Notes |
| --- | --- |
| `model` | Required. A Vikey model id. |
| `input` | Required. Text, or an array of message and tool result items. |
| `instructions` | System instructions. |
| `max_output_tokens` | Output token limit. |
| `stream` | `true` for a Responses-format event stream. |
| `tools` | Function tools. |

## Response

```json
{
  "id": "resp_...",
  "object": "response",
  "model": "openai/gpt-6.1-sol",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [{"type": "output_text", "text": "let can be reassigned, const cannot..."}]
    }
  ],
  "usage": {"input_tokens": 30, "output_tokens": 55, "total_tokens": 85}
}
```

Source: https://docs.vikey.ai/en/api/responses/
