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
- Choose Xcode › Settings… and select Intelligence.
- Under Chat, click Add a Chat Provider (some Xcode 26 builds say Add a Model Provider…) and choose Internet Hosted.
- URL:
https://api.vani.ai, the host only, without/v1. Xcode adds/v1/modelsand/v1/chat/completionsitself. - API Key: your Vani key. API Key Header:
x-api-key(or leave it empty to sendAuthorization: Bearer <key>). If you typeAuthorizationthere, the key field must readBearer vani_YOUR_API_KEY. - Description: Vani. Click Add.
- Select the Vani row. Xcode loads the model list from
https://api.vani.ai/v1/models; star the ones you use, for exampleopenai/gpt-6-sol,openai/gpt-6-sol-fastandmeta/muse-spark-1.3. - 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
meta/muse-spark-1.3Shell
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), meta/muse-spark-1.3 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.aiwith no/v1: Xcode appends/v1/modelsitself, so a URL ending in/v1becomes/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-keyor empty, paste only thevani_key; withAuthorization, the key field must start withBearer. - 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 withcurl 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.