# AI Model Gateway

Connect through Chat Completions, Responses, or Anthropic Messages using the Base URL, private key, and permitted model shown in your dashboard.

- **Endpoint** `https://www.arcvenza.com/api/v1`
- **Authentication** `Private gateway API key`
- **Protocol** `HTTPS / JSON`

## Workflow

1. **Create an API key**

   Create or select a key in AI Model Gateway. Allow the models you need and store the key in the ARCVENZA_API_KEY environment variable.

2. **Choose the API mode**

   OpenAI-compatible clients use /api/v1 as the Base URL and append /chat/completions or /responses. Claude Code uses /api as its Base URL and appends /v1/messages.

3. **Select a permitted model**

   Replace MODEL_ID in these examples with an exact model identifier permitted for the selected key. The live dashboard model catalog is authoritative.

## Parameters

| Name | Use | Description |
| --- | --- | --- |
| `OpenAI Base URL` | Required | https://www.arcvenza.com/api/v1 |
| `Claude Code Base URL` | Messages | https://www.arcvenza.com/api |
| `Authorization` | Chat / Responses | Send Authorization: Bearer `<YOUR_GATEWAY_KEY>`. |
| `x-api-key` | Messages | Send the private gateway key in x-api-key. The examples also include anthropic-version: 2023-06-01. |
| `model` | Required | Use the exact model identifier permitted for your key. |
| `Request body` | Required | Chat Completions: model + messages. Responses: model + input. Messages: model + max_tokens + messages. |

## Examples

### Chat Completions

```bash
curl 'https://www.arcvenza.com/api/v1/chat/completions' \
  -H "Authorization: Bearer $ARCVENZA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "model": "MODEL_ID",
  "messages": [{"role":"user","content":"Hello"}]
}'
```

### Responses

```bash
curl 'https://www.arcvenza.com/api/v1/responses' \
  -H "Authorization: Bearer $ARCVENZA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "model": "MODEL_ID",
  "input": "Hello"
}'
```

### Anthropic Messages

```bash
curl 'https://www.arcvenza.com/api/v1/messages' \
  -H "x-api-key: $ARCVENZA_API_KEY" \
  -H 'anthropic-version: 2023-06-01' \
  -H 'Content-Type: application/json' \
  --data '{
  "model": "MODEL_ID",
  "max_tokens": 1024,
  "messages": [{"role":"user","content":"Hello"}]
}'
```

## Troubleshooting and notes

- GET /api/v1/models returns models accessible to the supplied key. Model names must match exactly.
- A 401 response can indicate an invalid key. A 429 response can indicate an RPM or TPM limit; reduce the request rate and inspect the returned error and headers.
- The dashboard integration example follows the selected mode and model. Keep gateway keys in server-side environment variables.

## Import to CC Switch

Import your account configuration from the dashboard. The import includes your selected key, model and the correct endpoint for Claude Code or Codex.

| Target application | Base URL | API mode |
| --- | --- | --- |
| Claude Code | `https://www.arcvenza.com/api` | Anthropic Messages |
| Codex | `https://www.arcvenza.com/api/v1` | OpenAI Responses |

1. Install CC Switch 4.0.10 or newer on your computer.
2. Open AI Model Gateway, select an active key and a permitted model, then choose Import to CC Switch and the target application.
3. Review the provider in CC Switch and confirm the import. The switch-after-import option starts off; decide whether to activate it in CC Switch.

[Import from dashboard](/dashboard/ai-model-gateway#gateway-integration) · [CC Switch integration guide](https://github.com/farion1231/cc-switch/blob/main/docs/guides/deeplink-site-integration-guide-en.md)

## Related resources

- [View product](/data-for-ai/ai-model-gateway)
- [Open dashboard](/dashboard/ai-model-gateway)

## AI integration prompt

```text
Read the Arcvenza Markdown at https://www.arcvenza.com/docs/markdown/guides/ai-gateway.md and use https://www.arcvenza.com/llms.txt to find related guides. Cite https://www.arcvenza.com/docs/guides/ai-gateway for this page. Ask what I want to integrate, then identify the correct product, endpoint and authentication method. Confirm the required access before sending a live request through API Playground, and show how to supply credentials through environment variables. Indicate any account, plan or usage requirements and flag anything the docs do not establish.
```

[Open API Playground](/docs/playground)

[llms.txt](/llms.txt)

