Skip to content

New: DeepSeek V4.1 Flash Derisked. In chat and on the API.

See modelsWhat's newReport a bug
Open chat
All IDE and SDK guides

Xcode

Use the Vani API in Xcode

Add Vani as an internet-hosted chat provider in Xcode's coding intelligence.

Provider URL
https://api.vani.ai
Endpoints Xcode calls
/v1/models, /v1/chat/completions
Auth
Authorization: Bearer vani_… (or x-api-key)
Example model
openai/gpt-6-sol

Checked against the vendor's documentation on 2 October 2026. Need a key? Create one in the API console.

On this pageBefore you start

Before you start

  • Xcode 26 or later. Xcode 26 runs on macOS Sequoia 15.6 or later; Xcode 27 needs macOS Tahoe 26.6 or later and an Apple silicon Mac.
  • Use Xcode 26.3 or later: it fixed custom model providers disappearing between launches.
  • A custom provider powers the Chat experience. The built-in agents (for example Claude Agent or Codex) and predictive code completion do not use it.
  • On a managed Mac, an MDM profile can turn the coding assistant off (CodingAssistantAllowExternalIntegrations = false).

Add Vani as a chat provider

  1. Choose Xcode › Settings… and select Intelligence.
  2. Under Chat, click Add a Chat Provider (some Xcode 26 builds say Add a Model Provider…) and choose Internet Hosted.
  3. URL: https://api.vani.ai, the host only, without /v1. Xcode adds /v1/models and /v1/chat/completions itself.
  4. API Key: your Vani key. API Key Header: x-api-key (or leave it empty to send Authorization: Bearer <key>). If you type Authorization there, the key field must read Bearer vani_YOUR_API_KEY.
  5. Description: Vani. Click Add.
  6. Select the Vani row. Xcode loads the model list from https://api.vani.ai/v1/models; star the ones you use, for example openai/gpt-6-sol, openai/gpt-6-sol-fast and deepseek/deepseek-v4.1-flash.
  7. Open the coding assistant, pick a Vani model in the model menu and send a short prompt.
Text

Field values

URL:            https://api.vani.ai
API Key:        vani_YOUR_API_KEY
API Key Header: x-api-key
Description:    Vani

Models to star: openai/gpt-6-sol
                openai/gpt-6-sol-fast
                deepseek/deepseek-v4.1-flash
Shell

Check the two endpoints Xcode uses

export VANI_API_KEY="vani_YOUR_API_KEY"
curl -s https://api.vani.ai/v1/models -H "x-api-key: $VANI_API_KEY"
curl -s https://api.vani.ai/v1/chat/completions \
  -H "x-api-key: $VANI_API_KEY" -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-6-sol","messages":[{"role":"user","content":"Say hi"}],"stream":true}'

Note

Model ids are vendor-prefixed, exactly as GET /v1/models lists them: openai/gpt-6-sol, its priority-tier twin openai/gpt-6-sol-fast (same model, faster, billed at the fast rate), deepseek/deepseek-v4.1-flash or anthropic/claude-sonnet-5.5. Bare names such as gpt-6-sol are not model ids.

Note

Apple documents the URL and the two endpoints; how the API Key Header field behaves is described in provider guides rather than by Apple, which is why x-api-key (accepted by Vani either way) is the recommended value.

Troubleshooting

The model list stays empty, or requests return 404
The URL must be https://api.vani.ai with no /v1: Xcode appends /v1/models itself, so a URL ending in /v1 becomes /v1/v1/models. Remove the suffix and add the provider again.
401 Unauthorized when the models load or when you chat
The header and key do not match. With API Key Header x-api-key or empty, paste only the vani_ key; with Authorization, the key field must start with Bearer .
404 model_not_available, or "model not found"
Use the exact vendor-prefixed id, for example openai/gpt-6-sol. List the ids your key can use with curl https://api.vani.ai/v1/models -H "Authorization: Bearer $VANI_API_KEY".
The Vani provider is gone after relaunching Xcode
Update to Xcode 26.3 or later.
Agent conversations do not use Vani
Expected: custom providers apply to Chat conversations only. Start a chat conversation and pick the Vani model.

Still stuck? Check service status or the API error reference.

Sources