Agent integrations

Full setup steps for every supported app. Sign in to fill in your own key and model, and to confirm a real request.

ChatGPT

ChatGPT desktop · Codex · Responses

Official docs · Codex configuration reference
Surface

Supported

  • Streamed responses
  • Function calls
  • Local Codex tools including apply_patch
  • Usage and cost accounting

Not supported / watch out

  • The Responses endpoint is stateless: stored conversations, previous_response_id, and background mode are unsupported
  • Provider-hosted web search and file search are not supported
  • This affects new local tasks only; Codex cloud chats are unchanged
Base URL
https://router-api.xiu.ai/v1
Request path
/v1/responses
Models
Chosen after sign-in from the models available to the selected key.

Before you start

  1. Update the desktop app first

    Open the ChatGPT desktop app and install the latest update. Older builds may not expose the custom provider configuration.

The steps below use placeholders: replace YOUR_XIUROUTER_API_KEY with your own key and YOUR_MODEL_ID with an exact model ID. Signing in fills both in and injects the key when you copy.

  1. 1. Save the key for ChatGPT

    Replace YOUR_XIUROUTER_API_KEY with your key. In the console, copying injects the selected key for you.

    Terminal (writes the user environment)
    launchctl setenv XIUROUTER_API_KEY "YOUR_XIUROUTER_API_KEY"

    An app launched from the Dock cannot read a plain terminal export, so this writes a user-level variable. Quit ChatGPT completely and reopen it afterwards.

  2. 2. Add the XiuRouter provider

    In the desktop app, open Settings → Configuration → Open config.toml. Append the block below to the end of the file and keep every existing provider.

    ~/.codex/config.toml
    model = "YOUR_MODEL_ID"
    model_provider = "xiurouter"
    
    [model_providers.xiurouter]
    name = "XiuRouter"
    base_url = "https://router-api.xiu.ai/v1"
    env_key = "XIUROUTER_API_KEY"
    wire_api = "responses"

    This only adds; it removes nothing that is already there.

  3. 3. Reopen and create a new task

    Quit ChatGPT completely (not just the window), reopen it, and create a new local task in Codex. Tasks already open keep their original provider.

  4. 4. Create a new task and test

    Send a read-only instruction in the new task, such as “Tell me which framework this project uses without changing files.”

What success looks like

Codex answers normally and the console’s verification panel shows a succeeded record on /v1/responses with the model you selected.

If it did not work

5

Continue in the console

The console fills in your key and the models it can call, then matches a real request so you can prove the connection works.