Xcode Integration

Connect Apple development workflows to TheRouter.ai models

Xcode intelligence can call custom model providers. TheRouter.ai provides a single endpoint with broad model coverage for coding assistance use cases.

Overview

This page mirrors the OpenRouter workflow and adapts it for TheRouter.ai. Use TheRouter.ai as your OpenAI-compatible endpoint and keep model IDs in `provider/model` format.

Installation

Install the required SDKs and keep your TheRouter.ai key in environment variables.

install.sh
open /Applications/Xcode.app

Configuration

Set TheRouter.ai base URL overrides and pass your API key. Add attribution headers when your app should appear in rankings.

TypeScript
const endpoint = "https://api.therouter.ai/api";
const header = "Authorization: Bearer <THEROUTER_API_KEY>";

Caveats

Integration note
Xcode expects provider settings in system intelligence preferences. Use `/api` endpoint style exactly as required by the IDE UI.

For production rollouts, pin SDK versions and validate model compatibility in staging before broad rollout.