XCode
Track usage, control costs, and add guardrails to your Xcode AI coding sessions.
What is Xcode?
Xcode is Apple's IDE for building apps across Apple platforms. Its Apple Intelligence coding assistant (Xcode 26 and later) lets you add custom model providers under Settings → Intelligence, so you can chat with, and generate code from, models beyond the built-in options. Any provider that speaks an OpenAI-compatible API can be added—including FastRouter.
By routing Xcode through FastRouter, you get:
100+ models from OpenAI, Anthropic, Google, xAI, Meta, Groq, Mistral, and more through one endpoint—including coding models like Grok Code Fast 1
Observability for every request: cost, tokens, latency, and model selection tracked in real time
Reliability through automatic failover across providers, response caching, and intelligent routing
Governance with per-key budgets, rate limits, model restrictions, role-based access, and project isolation
This guide covers adding FastRouter as a model provider in Xcode's Intelligence settings.
Prerequisites
A FastRouter.ai account (sign up)
Xcode 26 or later on a Mac with Apple Intelligence enabled
Quick Start
Step 1: Enable Apple Intelligence
Go to macOS Settings → Apple Intelligence & Siri and make sure Apple Intelligence is turned on. This is required before Xcode can use any AI model providers.

Step 2: Get Your FastRouter API Key
Sign up or log in at fastrouter.ai
Navigate to your project's Keys page
Click Create User Key
Copy the key immediately. FastRouter does not display the key again after creation.
Step 3: Add FastRouter as a Model Provider
Open Xcode → Settings → Intelligence.

Click Add a Model Provider at the bottom of the page.

In the dialog, enter the following details:
URL:
https://api.fastrouter.ai/api/API Key Header:
AuthorizationAPI Key:
Bearer sk-add-your-key-here(include the literalBearerprefix before your FastRouter key)Description:
FastRouter(or any name you prefer)

Click Save to save the configuration.
Important: Do not add
/v1to the end of the endpoint. For Xcode provider setup, usehttps://api.fastrouter.ai/api/, not the direct API endpointhttps://api.fastrouter.ai/api/v1.
Note: Enter the API key with the
Bearerprefix because the API Key Header isAuthorization—Xcode sends the field's full value as the header, so it must beBearer <your-key>.

Step 4: Browse and Select Models
Once configured, select FastRouter in the provider list to see available models. If Xcode does not populate the list automatically, or you want a specific model, enter the FastRouter slug manually in provider/model-name format for example x-ai/grok-code-fast-1. Use Favorites to pin the models you use most; pinned models appear at the top for quick access.

Step 5: Start Using AI in Xcode
Open the chat interface and start working with your selected model. All requests route through FastRouter, and every request, token count, and cost appears in your FastRouter Dashboard.

Use Xcode with 100+ Models
FastRouter uses the provider/model-name format. Switch models from the chat model dropdown, or add FastRouter slugs to your Favorites:
Recommended models for Xcode:
x-ai/grok-code-fast-1— fast and inexpensive; a good default for routine editsanthropic/claude-4.5-sonnet— highest quality for complex, multi-file changesopenai/gpt-5.2— strong all-round alternative
Explore the full model catalog
Automatic Model Selection
Let FastRouter pick the best model for each request based on query complexity, domain, and cost by entering this slug as the model:
Explore automatic model selection
FAQs
Configuration & Setup
No models appear after I add FastRouter. What should I check?
Confirm the URL is exactly https://api.fastrouter.ai/api/, the API Key Header is Authorization, and the API Key field includes the Bearer prefix before your key. Do not add /v1 to the Xcode provider URL. If the model list still doesn't populate, enter a known slug manually (for example x-ai/grok-code-fast-1) and verify your key has access to it.
Can I use multiple models with the same API key?
Yes. The API key controls access and budget. Switch models from the chat dropdown or add more Favorites—no key changes needed.
Can I restrict a key to only use specific models?
Yes. When creating or editing a key, use the Select Models setting to limit which models the key can access. FastRouter rejects requests to unauthorized models.
Costs & Budgeting
How do I keep spend predictable?
Set a budget and rate limit on the key. The Dashboard breaks down costs by project, key, model, and tag.
Privacy & Security
Is my code sent to FastRouter's servers?
FastRouter acts as a pass-through gateway. Requests are routed to the model provider and responses are returned to your client. Content logging can be disabled per key for sensitive workloads. See the Disable Content Logging option in key settings.
Next Steps
Set up Fallback Models for high availability
Configure Alerts for spend and performance monitoring
Run a Free Audit on your existing LLM traffic to identify savings
Last updated
