Skip to content

XinoAPI Documentation

Unified access to Chinese language and video models. Language routes use OpenAI-compatible requests; video generation uses asynchronous media jobs with separate billing units. Self-service onboarding is available in supported regions.

Quick start

Keep your OpenAI SDK; update the API key, base URL, and model ID as needed. Check supported parameters before production. After your first successful request, review model usage and charged cost in the API Console usage log before scaling.

1. Get your API key

Sign up at api.xinoapi.com/register. Accounts have no monthly fee; add at least $5 in credits via Stripe before making API calls. Create API keys from your account center. Keys start with xino-.

2. Install the OpenAI SDK

pip install openai
npm install openai
go get github.com/sashabaranov/go-openai

3. Send your first request

from openai import OpenAI

client = OpenAI(
  api_key="xino-your-key-here",
  base_url="https://api.xinoapi.com/v1",
)

response = client.chat.completions.create(
  model="deepseek-v4-flash-0731",
  messages=[
    {"role": "user", "content": "Hello!"}
  ],
)

print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "xino-your-key-here",
  baseURL: "https://api.xinoapi.com/v1",
});

const response = await client.chat.completions.create({
  model: "deepseek-v4-flash-0731",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.choices[0].message.content);
package main

import (
  "context"
  "fmt"
  openai "github.com/sashabaranov/go-openai"
)

func main() {
  config := openai.DefaultConfig("xino-your-key-here")
  config.BaseURL = "https://api.xinoapi.com/v1"
  client := openai.NewClientWithConfig(config)

  resp, _ := client.CreateChatCompletion(
    context.Background(),
    openai.ChatCompletionRequest{
      Model: "deepseek-v4-flash-0731",
      Messages: []openai.ChatCompletionMessage{
        {Role: "user", Content: "Hello!"},
      },
    },
  )
  fmt.Println(resp.Choices[0].Message.Content)
}
curl https://api.xinoapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer xino-your-key-here" \
  -d '{
    "model": "deepseek-v4-flash-0731",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
That's it

Your first response should use the same OpenAI-compatible shape as your existing SDK calls. If you see an authentication error, double-check your API key in the dashboard.

Authentication

All requests require a bearer token in the Authorization header:

Authorization: Bearer xino-your-key-here

You can create, view, and revoke API keys at any time from your account center.

Security

Never commit API keys to git. Use environment variables: os.environ["XINOAPI_KEY"] in Python, process.env.XINOAPI_KEY in Node.js.

Available models

Pass the model ID as the model parameter. Full pricing at /pricing.

DeepSeek

deepseek-flash1M context · USD 0.12–0.24 in / USD 0.48–0.96 out per 1M
deepseek-v4-flash-0731Confirm route rate and limits in console
deepseek-v4-pro-0813USD 0.53–1.06 in / USD 1.58–3.17 out per 1M

Alibaba Qwen

qwen4-max1M context · USD 1.20 in / USD 3.60 out per 1M
qwen3.8-flash1M context · USD 0.12 in / USD 0.38 out per 1M
qwen3.8-maxUSD 1.60 in / USD 4.80 out per 1M
qwen3.7-plusUSD 0.32–0.96 in / USD 1.28–3.84 out per 1M
qwen3.7-flashUSD 0.024–0.16 in / USD 0.10–0.64 out per 1M

Zhipu GLM

glm-5.3-flashUSD 0.12 in / USD 0.40 out per 1M
glm-5.3USD 1.12 in / USD 3.52 out per 1M
glm-5.2USD 1.12 in / USD 3.52 out per 1M

Moonshot Kimi

kimi-k3.1-pro1M context · USD 1.60 in / USD 8.00 out per 1M
k3USD 2.40 in / USD 11.99 out per 1M
k3-256Confirm route rate and limits in console
kimi-k2.7-codeUSD 0.78 in / USD 3.24 out per 1M
kimi-k2.7-code-highspeedUSD 1.56 in / USD 6.48 out per 1M

MiniMax

MiniMax-M3.1-Flash1M context · USD 0.12 in / USD 0.48 out per 1M
MiniMax-M3USD 0.24–0.48 in / USD 0.96–1.92 out per 1M
MiniMax-M2.7Confirm route rate and limits in console
MiniMax-M2.7-highspeedConfirm route rate and limits in console

ByteDance Seed / Doubao

doubao-seed-2-1-lite-2609151M context · USD 0.096 in / USD 0.32 out per 1M
doubao-seed-2-1-pro-260628USD 0.72 in / USD 3.60 out per 1M
doubao-seed-2-1-turbo-260628USD 0.36 in / USD 1.80 out per 1M
doubao-seed-evolving-latest-versionUSD 0.72 in / USD 3.60 out per 1M

Xiaomi MiMo

mimo-v2.5-proUSD 0.35 in / USD 0.70 out per 1M
mimo-v2.5USD 0.11 in / USD 0.22 out per 1M

Tencent Hunyuan

hy4-flash1M context · USD 0.06 in / USD 0.24 out per 1M
hy3USD 0.12 in / USD 0.48 out per 1M
hy3-previewConfirm route rate and limits in console

Baidu ERNIE

ernie-5.5-flash-preview1M context · USD 0.11–0.22 in / USD 0.45–0.90 out per 1M
ernie-5.1Confirm route rate and limits in console
ernie-5.0USD 1.12 in / USD 4.48 out per 1M

Video generation · limited availability

doubao-seedance-2-5-260628Confirm task API, access, meter, and limits before integration
doubao-seedance-2-0-260128Confirm task API, access, meter, and limits before integration
doubao-seedance-2-0-mini-260615Confirm task API, access, meter, and limits before integration
MiniMax-H3Confirm task API, access, meter, and limits before integration
Video API

Video-generation models use asynchronous jobs and provider-specific media inputs. They are priced separately from chat completions; do not send them to /v1/chat/completions. Limited availability: confirm access and the route-specific task API in your XinoAPI dashboard before integration. Submit a task, poll its status using the documented task ID, and retrieve output only after success. Confirm input limits, timeout/cancellation behavior, output URL expiry, and failed-task billing with support. Contact support for model-specific endpoints and request examples.

Image APIs · public listings

doubao-seedream-5-0-260128Confirm endpoint, access, media meter, and supported inputs
doubao-seedream-5-0-pro-260628Confirm endpoint, access, media meter, and supported inputs
qwen-image-3.0-proConfirm endpoint, access, media meter, and supported inputs
wan2.7-image-proConfirm endpoint, access, media meter, and supported inputs

Qwen Image and Wan Image list POST /v1/images/generations in public endpoint metadata. Seedream endpoint details require confirmation. Public listings do not certify account access, image editing capabilities, or final billed amounts. See image models.

3D generation · public listings

doubao-seed3d-2-0-260328Confirm 3D task API, access and billing

Do not send image, video or 3D jobs to the chat endpoint based only on a generic OpenAI label in the public catalog. Confirm the route-specific media API with support.

Chat completions

POST https://api.xinoapi.com/v1/chat/completions

OpenAI-compatible chat completions for supported parameters. Streaming, tools, JSON mode, sampling controls, and output limits depend on the selected route. Verify per-model capabilities before production.

response = client.chat.completions.create(
  model="deepseek-v4-flash-0731",
  messages=[
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Explain quantum entanglement in 3 sentences."},
  ],
  temperature=0.7,
  max_tokens=500,
)

Streaming

Set stream=True to receive Server-Sent Events. The response streams token-by-token in the standard OpenAI format.

stream = client.chat.completions.create(
  model="deepseek-v4-flash-0731",
  messages=[{"role": "user", "content": "Write a haiku about code."}],
  stream=True,
)

for chunk in stream:
  if chunk.choices[0].delta.content:
    print(chunk.choices[0].delta.content, end="", flush=True)
const stream = await client.chat.completions.create({
  model: "deepseek-v4-flash-0731",
  messages: [{ role: "user", content: "Write a haiku." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}

Function calling

Most XinoAPI models support OpenAI-style function calling (tools parameter). DeepSeek, Qwen, and GLM have native support. Kimi and MiniMax have partial support — test your specific use case.

tools = [{
  "type": "function",
  "function": {
    "name": "get_weather",
    "description": "Get current weather for a city",
    "parameters": {
      "type": "object",
      "properties": {
        "city": {"type": "string"},
      },
      "required": ["city"],
    },
  },
}]

response = client.chat.completions.create(
  model="deepseek-v4-flash-0731",
  messages=[{"role": "user", "content": "What's the weather in Tokyo?"}],
  tools=tools,
)

tool_calls = response.choices[0].message.tool_calls
Agent security

If you're building an agent that executes tool calls, use the Privacy SDK's response scanner to detect malicious tool calls injected by compromised intermediaries. See arXiv:2604.08407 for the threat model.

Agent integrations

Choose your client below. Chat Completions, Responses and Anthropic Messages are separate protocols; check the selected model and client together.

We checked the examples for configuration and format. Test your client, model and billing with a short request before scaling.

Before connecting

Create a restricted API key in your account center and confirm the model is available to that key. Start with one short request, then compare its model, token usage and charge with your account usage log.

For CLI clients, set XINOAPI_API_KEY in the current terminal. Keep real keys out of project files, shared workflows and source control. The following values are placeholders.

# macOS / Linux
export XINOAPI_API_KEY="YOUR_XINOAPI_API_KEY"

# PowerShell
$env:XINOAPI_API_KEY = "YOUR_XINOAPI_API_KEY"

OpenCode

Merge this provider into opencode.jsonc without replacing existing providers. Supply the key through XINOAPI_API_KEY, restart OpenCode in that terminal, then use /models to select the XinoAPI model.

{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "xinoapi": {
      "name": "XinoAPI",
      "env": [
        "XINOAPI_API_KEY"
      ],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://api.xinoapi.com/v1"
      },
      "models": {
        "deepseek-v4-flash-0731": {
          "name": "DeepSeek V4 Flash"
        }
      }
    }
  }
}
Official documentation

Cline

Open Cline settings, choose OpenAI Compatible, and enter the values below. If Plan and Act use separate configurations, update both. Use the exact model ID rather than its display name.

API Provider: OpenAI Compatible
Base URL: https://api.xinoapi.com/v1
API Key: YOUR_XINOAPI_API_KEY
Model ID: deepseek-v4-flash-0731

Set context and output limits from the selected model documentation. Enable image input or tool calling only after checking that route. Client price fields are estimates; your account usage log records the gateway charge.

Official documentation

Dify

Install the OpenAI-API-compatible model provider in Dify, then add an LLM with the values below. Choose Chat completion mode and Chat Completions API. Enable function calling only for a route you have verified.

Type: LLM
Model Name: deepseek-v4-flash-0731
API Key: YOUR_XINOAPI_API_KEY
API Base URL: https://api.xinoapi.com/v1
Completion mode: Chat
API Type: Chat Completions

Import the workflow into a new app, then reselect your configured model in the LLM node. It connects Start, LLM and End; credentials are stored in Dify, not in the download.

Download Dify workflow Official documentation

n8n

For an AI Agent workflow, connect an OpenAI Chat Model node with your XinoAPI key and base URL. Enter the model ID manually if needed. Leave Use Responses API off for Chat Completions routes; built-in provider tools require separate verification.

The downloads use Manual Trigger and HTTP Request nodes for chat, image generation and video tasks. Import a workflow, create a Header Auth credential with header name Authorization and value Bearer followed by your key, and select it in every HTTP Request node.

Before running the video template, replace the source image URL with a public HTTPS image you control. The submit workflow sends one request. Copy its task ID into the separate status workflow URL before polling; that workflow only reads status. After completion, use GET /v1/videos/{task_id}/content to download.

Generation requests can incur charges. Templates are inactive and have no automatic submission retries. After a timeout, check the task ID and usage before submitting again. Stop polling failed or cancelled tasks; never use an unbounded loop.

Download chat workflow Download image workflow Download video workflow Download video status workflow Official documentation

Cherry Studio

In provider settings, add a custom OpenAI-compatible service named XinoAPI. Enter the key and base URL below, enable the provider, add the exact model ID, then select it in a new conversation.

Provider: OpenAI compatible
API Host / Base URL: https://api.xinoapi.com/v1
API Key: YOUR_XINOAPI_API_KEY
Model ID: deepseek-v4-flash-0731

Check the final request path is /v1/chat/completions, with /v1 present once. Interface labels vary by client version. Chat setup does not confirm image generation, knowledge-base embeddings or MCP tool support.

Official documentation

Codex CLI

Current Codex requires the Responses protocol. Merge this into ~/.codex/config.toml and set XINOAPI_API_KEY in the same terminal. This is a configuration example; verify Responses streaming and a complete tool-result turn with your selected route before use.

model = "deepseek-v4-flash-0731"
model_provider = "xinoapi"

[model_providers.xinoapi]
name = "XinoAPI"
base_url = "https://api.xinoapi.com/v1"
env_key = "XINOAPI_API_KEY"
wire_api = "responses"
supports_websockets = false

A successful Chat Completions request does not establish Codex compatibility. If Responses or required tools are unavailable for your model, use a Chat Completions client above. Do not rely on OPENAI_MODEL to select a Codex model.

Official documentation

After merging the provider configuration, start Codex from the terminal containing XINOAPI_API_KEY. ChatGPT sign-in is a separate authentication path and does not supply a XinoAPI key. Confirm the model supports Responses before sending a coding task.

codex
Download Codex provider configuration

Cursor

In Cursor Settings, open Models and the API key settings. If your plan and team policy allow custom providers, set the OpenAI base URL override to the value below and add the exact model ID. Missing controls require checking Cursor access, not changing your XinoAPI key.

Override OpenAI Base URL: https://api.xinoapi.com/v1
OpenAI API Key: YOUR_XINOAPI_API_KEY
Custom Model ID: deepseek-v4-flash-0731

Cursor BYOK applies to supported chat models. Tab completion continues to use Cursor models. Agent features and model availability must be verified separately; adding a key does not replace every Cursor feature or subscription charge.

Cursor routes BYOK requests through its backend. Review Cursor and upstream data policies before sending sensitive content. Team fees and access rules depend on your Cursor plan.

Official documentation

Continue

Merge this model into your local Continue config.yaml. Store XINOAPI_API_KEY in ~/.continue/.env, then restart the IDE. IDE extensions do not inherit exports from an existing terminal; the Continue CLI can use its process environment.

name: XinoAPI
version: 1.0.0
schema: v1
models:
  - name: XinoAPI DeepSeek
    provider: openai
    model: deepseek-v4-flash-0731
    apiBase: https://api.xinoapi.com/v1
    apiKey: ${{ secrets.XINOAPI_API_KEY }}
    useResponsesApi: false
    roles: [chat]

Select XinoAPI DeepSeek for Chat. This example uses the v1 YAML schema and explicitly selects Chat Completions. Enable Agent, editing, autocomplete or other model roles only after checking their separate requirements.

Download Continue configurationOfficial documentationOfficial documentation

Aider

Merge the downloaded values into .aider.conf.yml in your home or project directory. Supply OPENAI_API_KEY through the environment; the openai/ prefix selects Aider routing and is not part of the XinoAPI model ID.

model: openai/deepseek-v4-flash-0731
openai-api-base: https://api.xinoapi.com/v1
auto-commits: false
dirty-commits: false
# macOS / Linux
export OPENAI_API_KEY="$XINOAPI_API_KEY"
aider --config aider-xinoapi.yml

# PowerShell
$env:OPENAI_API_KEY = $env:XINOAPI_API_KEY
aider --config aider-xinoapi.yml

Use the downloaded filename with --config, or merge it into your existing .aider.conf.yml. Automatic commits are disabled in this example; Aider can still edit files. Confirm model limits and review changes in a test repository before regular use.

Download Aider configurationOfficial documentation

Open WebUI

Open Settings, Admin, Connections, then add an OpenAI API connection. Keep the provider at Default, enter the URL and key below, and restrict Model IDs to the routes you intend to use. Save and select the model in a new chat.

Provider: Default / OpenAI compatible
URL: https://api.xinoapi.com/v1
API Key: YOUR_XINOAPI_API_KEY
Model IDs: deepseek-v4-flash-0731

Verify Connection checks /models, not a complete conversation. If model discovery fails, confirm key permissions and add the exact Model IDs manually. Chat success does not verify embeddings, image generation, web search or external tools.

Official documentation

LangChain / LangGraph

These Python examples target langchain-openai 1.x and LangGraph 1.x on Python 3.10 or newer. Set XINOAPI_API_KEY in the same terminal, install the packages, then run either example. Each run below sends one short model request.

python -m pip install "langchain-openai>=1,<2" "langgraph>=1,<2"
python langchain_xinoapi.py
# Or, with both downloaded files in the same directory:
python langgraph_xinoapi.py
import os

from langchain_openai import ChatOpenAI


def make_model():
    return ChatOpenAI(
        api_key=os.environ["XINOAPI_API_KEY"],
        base_url="https://api.xinoapi.com/v1",
        model="deepseek-v4-flash-0731",
        use_responses_api=False,
        stream_usage=False,
        max_tokens=64,
        max_retries=0,
        timeout=30,
    )


if __name__ == "__main__":
    print(make_model().invoke("Reply with one short greeting.").content)
Download LangChain example
from langgraph.graph import END, START, MessagesState, StateGraph

from langchain_xinoapi import make_model


def make_graph():
    model = make_model()

    def reply(state: MessagesState):
        return {"messages": [model.invoke(state["messages"])]}

    builder = StateGraph(MessagesState)
    builder.add_node("reply", reply)
    builder.add_edge(START, "reply")
    builder.add_edge("reply", END)
    return builder.compile()


if __name__ == "__main__":
    result = make_graph().invoke({
        "messages": [{"role": "user", "content": "Reply with one short greeting."}]
    })
    print(result["messages"][-1].content)
Download LangGraph example

The LangGraph example adds one reply node and ends after its response. It has no tool loop, persistence or automatic retries. ChatOpenAI is set to Chat Completions; provider-specific reasoning fields may be discarded. Verify tool results, streaming and usage separately before extending the graph.

Official documentationOfficial documentation

Vercel AI SDK

This TypeScript example targets AI SDK 7.x with @ai-sdk/openai-compatible 3.x and Node.js 22 or newer. Keep XINOAPI_API_KEY on the server; do not expose it through browser code or a public environment variable.

npm install ai@7 @ai-sdk/openai-compatible@3 tsx
npx tsx vercel-ai-xinoapi.ts text
# Or make one streaming request:
npx tsx vercel-ai-xinoapi.ts stream
import { generateText, streamText } from 'ai';
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';

async function main() {
  const mode = process.argv[2] ?? 'text';
  if (!['text', 'stream'].includes(mode)) throw new Error('Choose text or stream.');
  const apiKey = process.env.XINOAPI_API_KEY;
  if (!apiKey) throw new Error('Set XINOAPI_API_KEY.');

  const xinoapi = createOpenAICompatible({
    name: 'xinoapi',
    apiKey,
    baseURL: 'https://api.xinoapi.com/v1',
  });
  const settings = {
    model: xinoapi.chatModel('deepseek-v4-flash-0731'),
    prompt: 'Reply with one short greeting.',
    maxOutputTokens: 64,
    maxRetries: 0,
  };

  if (mode === 'stream') {
    const result = streamText(settings);
    for await (const text of result.textStream) process.stdout.write(text);
  } else {
    const result = await generateText(settings);
    console.log(result.text);
  }
}

main().catch(error => {
  console.error(error.message);
  process.exitCode = 1;
});

The text and stream arguments select separate single-request branches. chatModel explicitly selects Chat Completions and maxRetries disables automatic retries. Structured outputs, stream usage, reasoning and hosted tools need their own route checks.

Download AI SDK exampleOfficial documentation

DeepSeek Harness

DeepSeek Harness is the official deepseek-ai/deepseek-harness project. This guide follows repository snapshot e8f7b93 from 2026-11-11. That source requires Node.js 24.9 or newer; the npm release may differ. Check your installed version before merging settings.

npx @deepseek-ai/dsh web

In the local Web UI, open Settings, Models, Add model provider, then Custom model API. Use provider ID xinoapi, the XinoAPI base URL and key, protocol OpenAI Chat Completions, and an exact model ID. Select the added model in a new session.

Provider ID: xinoapi
Base URL: https://api.xinoapi.com/v1
Protocol: OpenAI Chat Completions (openai-completions)
Model ID: deepseek-v4-flash-0731

The advanced download is a merge fragment for the Web profile at $DSH_HOME/profiles/web/cordis.patch.yml. Preserve existing entry settings and providers; do not replace the whole file or config object. Set XINOAPI_API_KEY in the Harness server process.

- id: llm-pi-ai
  config:
    providers:
      xinoapi:
        apiKeyEnv: XINOAPI_API_KEY
        api: openai-completions
        baseURL: https://api.xinoapi.com/v1
        models:
          - id: deepseek-v4-flash-0731

Use a custom provider for gateway model discovery; redirecting a built-in provider can retain its original catalog. Custom chat does not configure DeepSeek account login or native Search and Fetch, which may require separate credentials, endpoints and billing.

Download Harness merge fragmentOfficial documentation

Claude Code

Anthropic does not support routing Claude Code to non-Claude models through a gateway. XinoAPI compatibility with Claude Code is not verified here. Do not reuse these Chat Completions settings as a working Claude Code configuration.

Required protocol: Anthropic Messages
Messages endpoint: POST /v1/messages
Optional token counting: POST /v1/messages/count_tokens
Stream: Anthropic SSE events
Headers: anthropic-version, anthropic-beta

For a gateway serving supported Claude models, verify its authentication headers, Messages, streaming events and full tool-result turns. Token counting is optional in the current client. Check /status for the effective provider and account; Claude Desktop has separate configuration.

Official documentationOfficial documentation

Verify the connection

Check authentication, model ID, protocol and final URL first. Test streaming and one tool-call round trip separately. For 401, check the key; for 404, check the path and model; for 429, check limits before retrying. Confirm the charge in your account usage log.

Claude Code has a separate compatibility section above. A protocol label alone does not verify model access, tools or billing.

CC Switch setup

CC Switch is a multi-tool manager for AI coding CLIs. Add XinoAPI as a custom OpenAI-compatible provider, then reuse it across supported tools that can call an OpenAI-style endpoint.

Provider typeOpenAI compatible / custom OpenAI provider
Base URLhttps://api.xinoapi.com/v1
API keyxino-your-key-here
Recommended modeldeepseek-v4-flash-0731 for fast edits, deepseek-v4-pro-0813 for planning and review
# CC Switch custom provider values
Provider: OpenAI compatible
Base URL: https://api.xinoapi.com/v1
API Key: xino-your-key-here
Model: deepseek-v4-flash-0731
Agent security

For agents that can execute commands or edit files, avoid sending secrets in prompts, enable local redaction where possible, and review tool calls before execution.

Privacy SDK

The XinoAPI Privacy SDK is a drop-in replacement for the OpenAI client that adds three defense layers: PII redaction, response threat scanning, and hash-chained audit logs. The published package is Alpha; review its package metadata and test it before production.

pip install "xinoapi-privacy[openai]"
from xinoapi_privacy import PrivateClient

client = PrivateClient(
  api_key="xino-your-key",
  base_url="https://api.xinoapi.com/v1",
)

# PII is redacted before sending, restored in the response.
# Response is scanned for threats. Audit log maintains hash chain.
response = client.chat.completions.create(
  model="deepseek-v4-flash-0731",
  messages=[{
    "role": "user",
    "content": "Email john@acme.com about Q3."
  }],
)

Verifying response signatures

Gateway response signing is an enterprise option subject to deployment and plan confirmation. It is not a default guarantee for every response. Contact security@xinoapi.com to confirm availability and obtain the deployment-specific verification specification.

Before integration, confirm the exact signed bytes, algorithm and encoding, version, streaming behavior, key delivery and rotation, timestamp checks, replay protection, and failure policy. Contact support for your account's signing configuration and integration guidance.

Scope of evidence

A gateway HMAC can help verify delivery from the gateway to your client. It does not independently prove that a response originated from a particular upstream model. Local SDK redaction, response scanning, and audit logs are separate client-side controls.

Provider Data Policies

XinoAPI is a gateway to third-party model providers. We do not train on your prompts or responses, but upstream providers operate under their own terms, data policies, and regional obligations. Do not send sensitive data unless your organization has reviewed the selected provider's policy and applied client-side redaction where appropriate.

XinoAPI defaultMetadata-only billing logs; no plaintext prompt/response retention by default
Mainland China usersRegistration, purchase, dashboard access, and API use are not permitted
DeepSeek / Qwen / GLM / Kimi / MiniMaxProvider-specific terms, data retention, training, and regional rules apply
Sensitive dataUse the Privacy SDK for local PII and secret redaction before prompts leave your environment

Error handling

XinoAPI returns standard HTTP status codes and OpenAI-compatible error bodies.

400Bad request — malformed JSON
401Invalid or missing API key
402Insufficient credits — top up to continue
422Response blocked by security scanner
429Rate limit exceeded — honor Retry-After when present
500Internal gateway error
502Upstream provider error
503Temporary capacity protection — retry with exponential backoff
504Upstream timeout

Rate limits & concurrency

XinoAPI scales concurrency and throughput dynamically by account tier and upstream route capacity rather than locking every API key to a fixed 60 RPM or 10-stream cap:

Need dedicated concurrency reservations, higher sustained RPM, or custom routing pools? Email support@xinoapi.com.

Migration from other providers

From OpenAI

# Before - direct provider account and regional verification may be required
client = OpenAI(
  api_key="sk-...",
  base_url="https://api.deepseek.com",
)

# After - one XinoAPI key, plus 4 other provider families available
client = OpenAI(
  api_key="xino-...",
  base_url="https://api.xinoapi.com/v1",
)
# Use explicit model IDs: deepseek-flash or deepseek-v4-pro-0813

Frequently asked questions

How do I access DeepSeek from outside China?

Use XinoAPI as an OpenAI-compatible gateway in supported regions. Register at api.xinoapi.com/register, then set base_url="https://api.xinoapi.com/v1" in the OpenAI SDK.

Is the XinoAPI endpoint OpenAI SDK compatible?

Yes. The /v1/chat/completions endpoint accepts the exact same request format as OpenAI and returns the same response shape. Parameter support varies by model and route; test streaming, tool calls, JSON mode, and sampling controls for your workload.

What model name should I use for DeepSeek V4?

Use deepseek-flash (DeepSeek V4.1 Flash) for fast chat and coding, and deepseek-v4-pro-0813 for planning and code review. Both have published USD token rates on the pricing page.

Which models support function calling?

Function calling applies to language routes and depends on the selected upstream model. Check the route capabilities returned for your account and test the exact model ID before production. Video-generation models use asynchronous media jobs and do not accept the OpenAI tools parameter.

How do I stream responses?

Add stream=True (Python) or stream: true (Node.js) to your request. The response becomes an async iterator yielding OpenAI-format chunks. See the streaming section.

What's the maximum context window?

It varies by model. DeepSeek V4, GLM-5.3, Kimi K3, and MiniMax M3 are listed with up to 1M context; Dola Seed 2.1 Turbo and Kimi K2.6 are listed at 256K. Video models use duration and media limits instead of a chat context window. See available models for details.

Are there rate limits I should know about?

Limits scale dynamically by account tier and upstream model capacity rather than a fixed 60 RPM or 10-stream cap. When a route hits capacity, XinoAPI returns HTTP 429 (with Retry-After when available) or 503 so clients can back off cleanly. Email support@xinoapi.com for dedicated enterprise throughput.

How do I handle errors?

XinoAPI uses standard HTTP status codes. For 402 (insufficient credits), prompt the user to top up. For 429 (rate limit) or 503 (temporary capacity guard), implement exponential backoff with jitter and honor Retry-After when present. For 502/504 (upstream errors), retry with a different model or wait. See the error reference.

Is my prompt data used to train models?

XinoAPI does not train models on customer prompts or responses. Upstream providers operate under their own policies, so use client-side redaction and provider review before sending sensitive data.

What uptime terms are available?

XinoAPI is built for high availability with failover across compatible upstream routes where possible. Public uptime targets, credits, and formal uptime commitments are handled through enterprise agreements.

Chat with us