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

# Responses API and Codex

> Choose the correct integration for a Codex Provider or a model confirmed to support Responses.

`/v1/responses` is not a universal “newer chat API.” In NexusAPI, it is primarily for the custom Provider configured in the [Codex CLI guide](/en/tools/codex-cli), or for a model, key group, and channel that are explicitly confirmed to support the Responses protocol.

<Warning>
  **Confirm the model and channel first**

  Do not use `/v1/responses` for current Anthropic-type Claude channels. If you receive `status_code=500, not implemented`, use [Chat Completions](/en/developer/openai-compatible), or let Claude Code use native [Messages](/en/developer/anthropic-messages) configuration instead.
</Warning>

## Endpoint and scope

```text theme={"system"}
POST https://nexusapi.link/v1/responses
```

| Scenario                                         | Recommended approach                                                                                  |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| Codex CLI                                        | Use the `wire_api = "responses"` Provider configuration in the [Codex CLI guide](/en/tools/codex-cli) |
| Another app with a model confirmed for Responses | Use that app's Responses client or schema and verify a minimum request first                          |
| General OpenAI-compatible text app               | Use [Chat Completions](/en/developer/openai-compatible); do not switch just because this API is newer |
| Anthropic-type Claude                            | Use Messages or Chat Completions, not this endpoint                                                   |

## Minimum verification request

Only after model and channel support have been confirmed, test connectivity with:

```bash theme={"system"}
curl 'https://nexusapi.link/v1/responses' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "model": "YOUR_RESPONSES_MODEL_ID",
    "input": "Reply only: connection succeeded"
  }'
```

`input` is not the same field as Chat Completions `messages`, and the response must not be parsed as `choices[0].message`. Use the [Apifox API reference](https://nexusapi.apifox.cn/) or your client's official schema for complete fields, streaming events, and result handling.

## Codex CLI configuration essentials

```toml theme={"system"}
model_provider = "nexusapi"
model = "YOUR_MODEL_ID"

[model_providers.nexusapi]
base_url = "https://nexusapi.link/v1"
env_key = "NEXUSAPI_API_KEY"
wire_api = "responses"
```

Keep the key in the `NEXUSAPI_API_KEY` environment variable, never in `config.toml` or `auth.json`. See the [Codex CLI guide](/en/tools/codex-cli) for installation, OS-specific environment variables, and verification.

## What to check first

1. The key group contains the model and the model ID exactly matches the Model Marketplace.
2. The client actually requests `/v1/responses`, not `/v1/v1/...`.
3. The model is confirmed to support Responses; use a different protocol for Anthropic-type Claude.
4. Keep the Request ID, client version, and complete error text, then follow the [self-check guide](/en/faq/self-check).
