API documentation

API Access Documentation

Use one Taida Nexus API key and a unified interface to access every available model. You do not need to configure a separate upstream address for each model.

API Address

Unified base URL, endpoints, and authentication methods.

View guide

Agents & IDEs

Connect Cursor, Cline, Dify, and other compatible clients.

View guide

Model List

Current model IDs, capabilities, endpoints, and prices.

View guide

Chat & Embeddings

Chat completions, web search, vision, and embeddings.

View guide

Smart Routing

Use the auto model to select a suitable model automatically.

View guide

Images & Video

Image and video generation endpoints and examples.

View guide

Speech Synthesis

Convert text to speech with a choice of voices.

View guide
01 · Connection

Connection Information

Connect applications only to the official Taida Nexus domain. The platform routing layer handles provider, region, and channel selection.

SDK Base URLhttps://api.taidatech.ai/v1
Chat & ReasoningPOST /v1/chat/completions
Responses APIPOST /v1/responses
Anthropic MessagesPOST /v1/messages
Image GenerationPOST /v1/images/generations
Video GenerationPOST /v1/videos
EmbeddingsPOST /v1/embeddings
Speech SynthesisPOST /v1/audio/speech
List ModelsGET /v1/models

Important: For any OpenAI-compatible client, set the Base URL to https://api.taidatech.ai/v1. Do not include a specific endpoint path such as /chat/completions, because the client appends that path automatically.

  1. 1
    Create an API key

    Set model scope, credit limit, expiration, and IP allowlist for each project.

  2. 2
    Configure the Base URL

    Use the unified platform address in your OpenAI-compatible SDK.

  3. 3
    Select a Model ID

    Call GET /v1/models and use one of the returned model IDs.

02 · Agents & IDEs

Agents & IDE Integration

Taida Nexus supports the OpenAI-compatible protocol. Agents, IDE extensions, and orchestration frameworks that accept a custom Base URL can connect using three settings:

Base URL / API Addresshttps://api.taidatech.ai/v1
API KeyAn sk- key created in the Console
Model IDauto or any model returned by /v1/models
  • Programming assistants and IDEs: in Cursor, Cline, Roo Code, Continue, or Aider, select the OpenAI Compatible provider and enter the three values above.
  • Desktop & chat clients: Cherry Studio, NextChat, LobeChat, ChatBox, and similar clients use the same settings.
  • Orchestration platforms & frameworks: Dify, LangChain, LlamaIndex, AutoGen, and custom OpenAI SDK agents can point base_url to the platform address.
  • Function calling: The chat endpoint supports tools, tool_choice, streaming, and streamed tool calls.
  • Model selection: Use auto when you do not want to choose a model. Billing records show the model that was actually used.
OpenAI SDK (Node.js; Python is similar)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.taidatech.ai/v1",
  apiKey: process.env.NEXUS_API_KEY,
});

// Streaming and function calling (tools / tool_choice) are supported.
const resp = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Read package.json and summarize the project." }],
  tools: myAgentTools,
});

Anthropic-compatible clients

The platform provides an Anthropic Messages-compatible endpoint at POST /v1/messages. Configure Claude Code and similar clients with these environment variables:

Claude Code environment variables
# Claude Code and other Anthropic-compatible clients
export ANTHROPIC_BASE_URL=https://api.taidatech.ai
export ANTHROPIC_AUTH_TOKEN=sk-your-nmd-api-key
# The client automatically appends the /v1/messages path.

Responses API clients

The platform provides POST /v1/responses and /v1/responses/compact for clients such as Codex CLI and the OpenAI Agents SDK.

Codex CLI configuration (~/.codex/config.toml)
# ~/.codex/config.toml
model = "auto"
model_provider = "taida"

[model_providers.taida]
name = "Taida Tech"
base_url = "https://api.taidatech.ai/v1"
env_key = "NEXUS_API_KEY"
wire_api = "responses"
03 · Authentication

Authentication & API Keys

Every request must include an API key. The key identifies the account and controls model permissions, rate limits, and available balance.

Authorization: Bearer YOUR_NMD_API_KEY
Store keys only in server-side environment variables. Never embed them in browser code, distributed client packages, or public repositories.

Environment variable
NEXUS_API_KEY=sk-your-nmd-api-key
04 · Models

Models & Pricing

Usage is billed in USD at the prices shown below. The models available to your account are returned by GET /v1/models.

Model IDCapabilitiesEndpointPlatform Price
autoSmart routing to a suitable modelChat CompletionsBilled by the model used
qwen3.6-flashGeneral text, web searchChat Completions$1.87355 / M input tokens · $11.2413 / M output tokens
qwen3.6-plusGeneral text, web searchChat Completions$3.7471 / M input tokens · $22.4826 / M output tokens
qwen3.7-plusText, vision, web searchChat Completions$2.998 / M input tokens · $11.991 / M output tokens
qwen3.7-maxComplex reasoning, vision, web searchChat Completions$18.736 / M input tokens · $56.207 / M output tokens
qwen3.8-maxComplex reasoning, visual understanding, and agentsChat Completions$2 / M input tokens · $6 / M output tokens
qwen3.8-2.4t-a95bComplex reasoning, visual understanding, and agentsChat Completions$2 / M input tokens · $6 / M output tokens
deepseek-v4-flashReasoning, code, web searchChat CompletionsFree input · $0.5 / M output tokens
deepseek-v4-proComplex reasoning, agents, web searchChat CompletionsFree input · $1 / M output tokens
kimi-k2.7-codeCode generation, complex reasoningChat Completions$7.119 / M input tokens · $29.977 / M output tokens
glm-5.2Complex reasoning, tool callingChat Completions$10.492 / M input tokens · $32.974 / M output tokens
qwen3.5-omni-flashMultimodal understanding (text, audio, vision)Chat Completions$2.8231 / M tokens (same input/output rate)
qwen3.5-omni-plusMultimodal understanding (text, audio, vision)Chat Completions$3.0124 / M tokens (same input/output rate)
qwen3-tts-flashText-to-speech with 10 voicesAudio Speech$10 / M characters ($0.10 / 10,000 characters)
qwen3.7-text-embeddingText embeddingsEmbeddings$0.07 / M tokens
qwen-image-2.0Text-to-image, reference image editingImages$0.256873 / image
qwen-image-2.0-proHigh-quality image generationImages$0.550443 / image
qwen-image-maxText-to-imageImages$0.550443 / image
qwen-image-plus-2026-01-09Text-to-imageImages$0.220177 / image
z-image-turboFast image generationImages$0.110089 / image
wan2.6-image / wan2.6-t2iText-to-imageImages$0.220177 / image
wan2.7-imageText-to-imageImages$0.220177 / image
wan2.7-image-proHigh-quality image generationImages$0.562065 / image
wan2.6-t2v / wan2.7-t2vText-to-video with audioVideos$0.733924 / second (720p)
happyhorse-1.0-t2v / i2v / r2vText-to-video, image-to-video, reference-to-videoVideos$0.3 / second
happyhorse-1.1-t2v / i2v / r2vText-to-video, image-to-video, reference-to-videoVideos$0.8 / second

Long-context pricing: qwen3.6-flash and qwen3.7-plus automatically use the long-context rate when input exceeds 256K tokens.

05 · Chat completions

Chat Completions API

Text models use the OpenAI-compatible Chat Completions endpoint. To switch models, change the model field in the request body.

curl https://api.taidatech.ai/v1/chat/completions \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-flash",
    "messages": [
      {"role": "system", "content": "You are a professional development assistant. "},
      {"role": "user", "content": "Explain in three sentences what is MaaS. "}
    ],
    "stream": false
  }'

Internet search

Some models support native web search. Add enable_search: true to request current information:

Web search request
curl https://api.taidatech.ai/v1/chat/completions \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-plus",
    "messages": [{"role": "user", "content": "What is in the technology news today?"}],
    "enable_search": true
  }'
  • Web search is supported by qwen3.6-flash, qwen3.6-plus, qwen3.7-plus, qwen3.7-max, qwen3.5-omni-flash, qwen3.5-omni-plus, deepseek-v4-flash, deepseek-v4-pro, kimi-k2.7-code, and auto.
  • glm-5.2 does not support this parameter and returns invalid_parameter_error.
  • The qwen3.5-omni series requires streaming mode (stream: true) for web search. The gateway injects the required upstream search settings automatically.
  • In Model Studio, supported models use web search by default. You can disable it from the conversation toolbar.

Image understanding

Vision input
curl https://api.taidatech.ai/v1/chat/completions \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-plus",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "Describe the image and extract its text."},
        {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
      ]
    }]
  }'

Conversation state: For multi-turn conversations, continue sending prior user and assistant messages in messages. The Playground saves sessions for you; the public API remains stateless.

06 · Smart routing

Smart Routing (auto)

Set model to auto and the gateway picks a suitable default model for the endpoint you call. Billing always follows the model that was actually used, and the usage ledger records it.

Smart routing request
curl https://api.taidatech.ai/v1/chat/completions \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Write a short Python example and explain how it works"}]
  }'
  • /v1/chat/completions, /v1/completions, and /v1/responses route to qwen3.6-flash.
  • /v1/embeddings routes to qwen3.7-text-embedding.
  • /v1/images/generations routes to qwen-image-2.0; /v1/videos routes to wan2.7-t2v.
  • /v1/audio/speech routes to qwen3-tts-flash.
  • Specify a fixed model ID when consistent model behavior is required.
07 · Embeddings

Embeddings API

qwen3.7-text-embedding converts text into vector embeddings for knowledge-base retrieval, semantic search, and clustering. It is billed by tokens.

Embeddings request
curl https://api.taidatech.ai/v1/embeddings \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-text-embedding",
    "input": ["First paragraph", "Second paragraph"]
  }'
  • Embedding models are API-only and do not appear in the Playground conversation list.

Image Generation

Image models use the standard image-generation endpoint and are billed per image. Supported families include Qwen Image, Wan, and Z-Image.

Image generation request
curl https://api.taidatech.ai/v1/images/generations \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-2.0",
    "prompt": "A clear glass cube in a white studio, product photography",
    "size": "1024x1024",
    "n": 1
  }'
  • n sets the number of images. Cost is based on the number generated.
  • Large images (such as 2048×2048) take approximately 45–70 seconds. Set the client timeout to at least 120 seconds.
  • Generated results are subject to upstream content-safety review. Rejected requests may return HTTP 400 and are not charged.
  • Download generated media promptly and store it in your own object storage when using the public API.
09 · Videos

Video Generation

After creating a task, use the returned task ID to check its status. Video usage is billed by duration in seconds. HappyHorse supports text-to-video (t2v), image-to-video (i2v), and reference-to-video (r2v).

Create a video task
curl https://api.taidatech.ai/v1/videos \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan2.7-t2v",
    "prompt": "A spaceship sweeps past the clouds as the camera slowly moves forward, cinematic lighting",
    "size": "1280*720",
    "duration": 5
  }'
Check a video task
curl https://api.taidatech.ai/v1/videos/TASK_ID \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Video generation is asynchronous. Production applications should save the task ID and poll its status instead of keeping one connection open until generation completes.

10 · Audio speech

Speech Synthesis API

qwen3-tts-flash converts text to natural speech. Usage is billed by character ($10 per million characters), and the current output format is WAV.

Speech synthesis request
curl https://api.taidatech.ai/v1/audio/speech \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-tts-flash",
    "input": "Hello. Welcome to Taida Nexus speech synthesis.",
    "voice": "Cherry"
  }'
  • Available voices: Cherry (default), Ethan, Nofish, Jennifer, Ryan, Katerina, Elias, Serena, Marcus, and Bella.
  • voice selects the voice; speed adjusts speaking speed from 0.5 to 2.0 (default 1.0).
  • Keep each request to 5,000 characters or fewer.
11 · Troubleshooting

Common Errors

400 invalid_parameter_errorThe model does not support a supplied parameter, or an image prompt failed content-safety review. Rejected generation requests are not charged.
401The API key is invalid, expired, revoked, or used from an IP outside its allowlist.
403The model is not available to the account, or the API key lacks model permission.
404 Invalid URLThe Base URL includes an endpoint path that the client appends again.
429The API key reached an RPM, concurrency, or spending limit, or the upstream channel is rate-limited.
503The upstream provider is busy or the current channel is unavailable. Try again later.
12 · Open source & compliance

Open Source and Compliance

The platform gateway is based on the open-source New API project under AGPLv3. Taida customizations cover model adaptation and intelligent routing. In accordance with AGPLv3 Section 13, the complete modified gateway source is available here:

  • Modified source repository: github.com/leonczh07-byte/new-api (taida branch, matching the online gateway).
  • File-by-file modification list: TAIDA_MODIFICATIONS.md.
  • The gateway remains subject to AGPLv3. All original copyright notices are retained.
  • The platform console, billing, and account system are separate proprietary components that interact with the gateway through APIs.

For source-code compliance questions, open an issue in the repository above or email contact@taidatech.ai.