# Responses

POST /v1/responses: OpenAI Responses format for Codex CLI and similar clients.

`POST https://ai.sivcloud.com/v1/responses` uses the OpenAI Responses format. Codex CLI uses it.

```bash
curl https://ai.sivcloud.com/v1/responses \
  -H "Authorization: Bearer $SIVCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "input": "Hello",
    "max_output_tokens": 256
  }'
```

## Response

`output` holds the answer items. `usage` has `input_tokens`, `output_tokens` and `input_tokens_details.cached_tokens` for the tokens read from cache. See [Cache](https://sivcloud.com/en/docs/cache/).

## Good to know

- Reasoning tokens count as output tokens.
- Not every model opens this endpoint. The Models page in the console marks the endpoints of each model.
- Streaming uses `"stream": true`. See [Streaming](https://sivcloud.com/en/docs/streaming/).
- Codex CLI setup is on the [Codex CLI](https://sivcloud.com/en/docs/tools/codex-cli/) page.
