Native APIs and setup

Connect through native model APIs with your endpoint and key

Use the native API for your selected model: OpenAI Responses, Chat Completions, Anthropic Messages, or Gemini GenerateContent. Set the Base URL, API key, and model ID in the matching SDK or client, then send your first request.

Connect with the model’s native SDK

Set the endpoint and API key in an SDK or client that supports your model’s native API.

  • Your model’s SDK or matching client lets you set its Base URL and API key.
  • You want to choose models and service tiers from the current XiuAI catalog.
  • You can test one request and check it in Usage before production use.

Choose the native API for your model

Each model uses its native API. Match the Base URL and request path to both the model and the client or SDK.

responses

OpenAI Responses

Base URL
https://router-api.xiu.ai/v1
Request path
/responses

Use with models that natively support Responses, through Codex, OpenAI SDKs, or applications built on Responses.

Use it for stateless model requests. Stored conversations, background mode, web search, and file search still require a service that provides those features.

messages

Anthropic Messages

Base URL
https://router-api.xiu.ai
Request path
/v1/messages

Use with Claude Code, Anthropic SDKs, and Claude-native clients that send Messages requests.

Use it for Messages model requests. Hosted server tools, Message Batches, and Files remain Anthropic platform features.

chat

OpenAI Chat Completions

Base URL
https://router-api.xiu.ai/v1
Request path
/chat/completions

Use with models that natively support Chat Completions, through OpenAI SDKs, matching clients, or custom-model integrations.

Tool calling, streaming, and client-specific agent behavior depend on the client and selected model. Confirm them with the target task.

gemini

Gemini GenerateContent

Base URL
https://router-api.xiu.ai
Request path
/v1beta/models/YOUR_MODEL_ID:generateContent

Use with Gemini SDKs and clients that require the native Gemini GenerateContent request format.

The model ID is part of the request path, and the Base URL differs from OpenAI SDKs. Do not add /v1 unless the matching guide shows it.

Choose in three steps

Choose your model and its native API, configure the matching client, then test one request.

  1. 1

    Identify the model’s native API

    Choose a client that supports the model’s Responses, Chat Completions, Anthropic Messages, or Gemini GenerateContent API.

  2. 2

    Confirm the model and service tier

    Use the current Models and pricing page for the exact model ID, declared endpoint types, tier, and unit rates.

  3. 3

    Verify one real request

    Create a scoped key, send a small request, and confirm the model, tier, tokens, status, and recorded cost in Usage.

Next steps