nexusflow
Online

Quick Start

Start with your first request, choose the OpenAI, Anthropic Messages, or Responses API protocol, and learn when to switch to async task mode.

Three Sync Protocols
OpenAI, Anthropic, and Responses compatible endpoints share the same models.
Async Tasks
Submit and poll image and video jobs through `/v1/tasks`.
Production Traffic
Review rate limits, error codes, and the monitoring page before launch.

Choose a Compatible Protocol

Prerequisites

1

Install the SDK

Uses the OpenAI SDK by default. If you already have an Anthropic client or need the Responses API, see the corresponding protocol docs.

Python
pip install openai
Node.js
npm install openai
2

Configure the API

Point base_url to nexusflow and use a single API Key to access all models.

Base URLhttps://nexusflow.hk/v1
API Keysk-air-xxxxxxxx(Get a key)
AuthenticationAuthorization: Bearer {API_KEY}
3

Make a Chat Request

Use the sync endpoint for text and reasoning models. The example below uses Qwen3.5 Plus.

from openai import OpenAI

client = OpenAI(
    api_key="sk-air-your-key",
    base_url="https://nexusflow.hk/v1",
)

response = client.chat.completions.create(
    model="qwen3.5-plus",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello, please introduce yourself."}
    ],
    temperature=0.7,
    max_tokens=1000
)

print(response.choices[0].message.content)
4

Integrate Async Tasks

When you start integrating image or video generation, we recommend using /v1/tasks. This pipeline is better suited for high-latency models, background batch jobs, and high-concurrency queuing.

curl -X POST https://nexusflow.hk/v1/tasks \
  -H "Authorization: Bearer sk-air-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "happyhorse-1.0-t2v",
    "prompt": "City coastline at dusk, slow dolly-in, cinematic natural light",
    "duration": 10,
    "resolution": "720P"
  }'

# Poll task status
curl https://nexusflow.hk/v1/tasks/task_xxx \
  -H "Authorization: Bearer sk-air-your-key"

High-Concurrency Integration Tips

Split chat requests and multimedia tasks into separate queues to avoid throughput contention.
A single API Key works across the OpenAI, Anthropic Messages, and Responses API protocols.
Poll tasks every 3-5 seconds and use exponential backoff for failed retries.
Confirm the RPM / TPM and concurrency strategy on the rate limits page before load testing.
Tips
  • Switch models by replacing the model parameter with another model ID
  • All models share a single API Key — no separate applications needed
  • The OpenAI, Anthropic Messages, and Responses API protocols share the same balance and usage records
  • Streaming is supported — just set stream: true
  • Use /v1/tasks for image and video to avoid synchronous blocking
💡 Cost-saving tip: Context Cache

For repeated system prompts or long document context, enable enable_context_caching: true (OpenAI protocol) or the cache_control annotation (Anthropic protocol). Cache hits are billed at only 10% of the input price. See billing details.

Next Steps