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. 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 $20 in credits before making API calls. Create API keys from the dashboard. 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 and revoke keys at any time from api.xinoapi.com/token. Each key has its own usage quota and can be restricted to specific models.

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-v4-flash-0731Confirm context, output limits, and parameters in console
deepseek-v4-pro-0813Confirm context, output limits, and parameters in console

Alibaba Qwen

qwen3.7-flashConfirm context, output limits, and parameters in console
qwen3.7-plusConfirm context, output limits, and parameters in console
qwen3.8-maxConfirm context, output limits, and parameters in console

Zhipu GLM

glm-5.3Confirm context, output limits, and parameters in console
glm-5.3-flashConfirm context, output limits, and parameters in console
glm-5.2Confirm context, output limits, and parameters in console

Moonshot Kimi

kimi-k2.7-codeConfirm context, output limits, and parameters in console

MiniMax

MiniMax-M3Confirm context, output limits, and parameters in console

ByteDance Seed / Doubao

doubao-seed-2-1-turbo-260628Confirm context, output limits, and parameters in console

Video generation · limited availability

MiniMax-H3Confirm task API, access, meter, and limits before integration
doubao-seedance-2-0-260128Confirm task API, access, meter, and limits before integration
doubao-seedance-2-5-260628Confirm 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. This page does not publish a verified video endpoint or a runnable video example.

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

XinoAPI works with developer agents that support OpenAI-compatible chat completions. Use the same API key and base URL, then choose a model based on the workflow: fast coding edits, long-context review, or enterprise-style instruction following.

Claude Code / Anthropic-style toolsNative Anthropic bridge: planned, not available for production. Confirm any third-party adapter separately
Codex / OpenAI SDK agentsSet base URL to https://api.xinoapi.com/v1 and use a XinoAPI model ID
OpenClaw, Cline, Roo, CursorChoose custom OpenAI-compatible provider and paste your XinoAPI key
CC SwitchUse XinoAPI with clients that support an OpenAI-compatible provider mode. Claude Code requires a separate adapter; the native Anthropic bridge is planned and not available for production
XINOAPI_BASE_URL=https://api.xinoapi.com/v1
XINOAPI_API_KEY=xino-your-key-here
XINOAPI_MODEL=deepseek-v4-flash-0731

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. A self-service signing-secret endpoint and executable verification example are not published here until validated.

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
500Internal gateway error
502Upstream provider error
504Upstream timeout

Rate limits

Default limits per API key:

Rate limit info is returned in response headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. For higher limits, 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-v4-flash-0731 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-v4-flash-0731 for general tasks and deepseek-v4-pro-0813 for planning and code review. Their public pricing is under verification; confirm the current quote in the API Console before purchasing credits. Use these active model IDs in new projects.

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?

60 requests/minute and 1M tokens/minute per key by default. Higher limits available on request. Rate limit headers are returned with every response.

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), implement exponential backoff. 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