Text call · cURL
curl https://tryaiapi.com/v1/chat/completions \ -H "Authorization: Bearer $INFWAVE_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "messages": [ {"role": "user", "content": "Hello"} ] }'
Visual model task · cURL
curl https://tryaiapi.com/v1/video/generations \ -H "Authorization: Bearer $INFWAVE_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-seedance-2.0", "prompt": "A cinematic product shot", "duration": 5, "resolution": "480p", "aspect_ratio": "16:9" }'
Models

One key for text and visual models

Unified view of Claude, ChatGPT, Gemini, DeepSeek, and visual model endpoints, model ID lookup, and status. Full catalog on the models page.

Claude models
InputFrom $9.00 / 1M tokens
OutputFrom $45.00 / 1M tokens
vs officialAccount discount after sign-in

Available now through the Anthropic Messages endpoint, with an OpenAI-compatible route for existing team tooling.

Endpoint
/v1/messages
Status
Available
Billing
Token
Claude relay Usage billing Messages
ChatGPT models
InputFrom $0.20 / 1M tokens
OutputFrom $1.25 / 1M tokens
vs officialShown by model group

Enablement returns the available model IDs. Useful for OpenAI SDK, Cursor, Codex CLI, and LangChain migration flows.

Endpoint
/v1/chat/completions
Status
Enablement required
Billing
Token
OpenAI compatible Usage billing Tools
Gemini models
InputFrom $0.20 / 1M tokens
OutputFrom $1.25 / 1M tokens
vs officialShown by model group

Routed through the OpenAI-compatible entrypoint. Exact model IDs are governed by the console and /v1/models.

Endpoint
/v1/chat/completions
Status
Enablement required
Billing
Token
OpenAI compatible Multimodal Usage billing
DeepSeek models
InputFrom $0.20 / 1M tokens
OutputFrom $1.25 / 1M tokens
vs officialShown by model group

For cost-sensitive and reasoning workloads. Public copy stays stable; callable aliases come from the live model API.

Endpoint
/v1/chat/completions
Status
Enablement required
Billing
Token
Reasoning Cost control Usage billing
Seedance 2.0
JobFrom ¥1.40 / 5 sec
DurationFrom ¥0.28 / sec
vs officialShown by video job rule

Video generation runs as async jobs with the same API key, job polling, and usage-log task details.

Fixed alias
doubao-seedance-2.0
Endpoint
/v1/video/generations
Status
Available
Video jobs Async generation Job billing
No models match the current filters.

Machine-readable model catalog: /docs/models.json. API definition: /docs/openapi.json.

curl · List models
curl https://tryaiapi.com/v1/models \ -H "Authorization: Bearer $INFWAVE_KEY"
Quick Start

Integrate in three steps

STEP 01

Request an API key

Open the console to create an API key. Bank transfer and VAT invoice supported.

STEP 02

Choose the endpoint

Text models use an SDK base URL swap. Visual models use /v1/video/generations to submit async tasks.

STEP 03

Review results and usage

Text calls return in real time; visual tasks are polled until completion. Usage records can be exported for reconciliation.

API Endpoints

Endpoints

GET

/v1/models

Query current callable model IDs before integration.

POST

/v1/chat/completions

OpenAI-compatible endpoint for SDKs, agents, and tools.

POST

/v1/messages

Anthropic Messages-compatible endpoint for Claude clients and SDKs.

POST

/v1/video/generations

Submit a visual generation task and receive a job ID and polling URL.

GET

/v1/video/generations/{task_id}

Poll task status, failure reason, and download URLs.

Code Examples · Advanced

Advanced scenario examples

Advanced text capabilities and visual model async task examples — cURL / Python / JavaScript shown for each scenario.

cURL · streaming response (SSE)
curl -N https://tryaiapi.com/v1/chat/completions \ -H "Authorization: Bearer $INFWAVE_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Write a short poem about clouds"}], "stream": true }'
Python · streaming response
from openai import OpenAI client = OpenAI(base_url="https://tryaiapi.com/v1", api_key="$INFWAVE_KEY") stream = client.chat.completions.create( model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Write a short poem about clouds"}], stream=True, ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="")
JavaScript · streaming response
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://tryaiapi.com/v1", apiKey: process.env.INFWAVE_KEY, }); const stream = await client.chat.completions.create({ model: "claude-sonnet-4-6", messages: [{ role: "user", content: "Write a short poem about clouds" }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0].delta.content ?? ""); }
cURL · visual model async task
# 1. Submit job curl https://tryaiapi.com/v1/video/generations \ -H "Authorization: Bearer $INFWAVE_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-seedance-2.0", "prompt": "A cinematic product shot on a clean studio desk", "duration": 5, "resolution": "480p", "aspect_ratio": "16:9" }' # 2. Poll result curl https://tryaiapi.com/v1/video/generations/$JOB_ID \ -H "Authorization: Bearer $INFWAVE_KEY"
Python · visual model async task
import os import time import requests headers = { "Authorization": f"Bearer {os.environ['INFWAVE_KEY']}", "Content-Type": "application/json", } job = requests.post( "https://tryaiapi.com/v1/video/generations", headers=headers, json={ "model": "doubao-seedance-2.0", "prompt": "A cinematic product shot on a clean studio desk", "duration": 5, "resolution": "480p", "aspect_ratio": "16:9", }, ) job.raise_for_status() poll_url = job.json()["poll_url"] while True: result = requests.get(poll_url, headers=headers) result.raise_for_status() data = result.json() if data["status"] in {"completed", "failed", "cancelled", "timeout"}: print(data) break time.sleep(5)
JavaScript · visual model async task
const headers = { Authorization: `Bearer ${process.env.INFWAVE_KEY}`, "Content-Type": "application/json", }; const submit = await fetch("https://tryaiapi.com/v1/video/generations", { method: "POST", headers, body: JSON.stringify({ model: "doubao-seedance-2.0", prompt: "A cinematic product shot on a clean studio desk", duration: 5, resolution: "480p", aspect_ratio: "16:9", }), }); const job = await submit.json(); while (true) { const res = await fetch(job.poll_url, { headers }); const result = await res.json(); if (["completed", "failed", "cancelled", "timeout"].includes(result.status)) { console.log(result); break; } await new Promise((resolve) => setTimeout(resolve, 5000)); }
cURL · tool calling (Function Calling)
curl https://tryaiapi.com/v1/chat/completions \ -H "Authorization: Bearer $INFWAVE_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "What's the weather like in Hangzhou?"}], "tools": [{ "type": "function", "function": { "name": "get_weather", "parameters": { "type": "object", "properties": {"city": {"type": "string"}} } } }] }'
Python · tool calling
from openai import OpenAI client = OpenAI(base_url="https://tryaiapi.com/v1", api_key="$INFWAVE_KEY") resp = client.chat.completions.create( model="claude-sonnet-4-6", messages=[{"role": "user", "content": "What's the weather like in Hangzhou?"}], tools=[{ "type": "function", "function": { "name": "get_weather", "parameters": { "type": "object", "properties": {"city": {"type": "string"}}, }, }, }], ) print(resp.choices[0].message.tool_calls)
JavaScript · tool calling
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://tryaiapi.com/v1", apiKey: process.env.INFWAVE_KEY, }); const resp = await client.chat.completions.create({ model: "claude-sonnet-4-6", messages: [{ role: "user", content: "What's the weather like in Hangzhou?" }], tools: [{ type: "function", function: { name: "get_weather", parameters: { type: "object", properties: { city: { type: "string" } }, }, }, }], }); console.log(resp.choices[0].message.tool_calls);
SDK Configuration

Client SDK configuration examples

Claude Code

All Claude models
# Set environment variables, then launch export ANTHROPIC_BASE_URL=https://tryaiapi.com export ANTHROPIC_API_KEY=your-infwave-key claude

Cursor

Claude + ChatGPT
# Settings → Models → Override OpenAI Base URL Base URL: https://tryaiapi.com API Key: your-infwave-key # Claude: use claude-sonnet-4-6 directly. ChatGPT IDs: query /v1/models first.

Anthropic Python SDK

All Claude models
import anthropic client = anthropic.Anthropic( base_url="https://tryaiapi.com", api_key="your-infwave-key", ) msg = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}], )

OpenAI Python SDK

Claude + ChatGPT
# Swap provider by changing the model name from openai import OpenAI client = OpenAI( base_url="https://tryaiapi.com/v1", api_key="your-infwave-key", ) # Claude resp = client.chat.completions.create( model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Hello"}], ) # ChatGPT — same client; query /v1/models for the model ID resp = client.chat.completions.create( model="chatgpt-model-id", messages=[{"role": "user", "content": "Hello"}], )

Visual model API

Seedance / Video tasks
# Standard HTTP call: submit a task, then poll poll_url curl https://tryaiapi.com/v1/video/generations \ -H "Authorization: Bearer your-infwave-key" \ -H "Content-Type: application/json" \ -d '{"model":"doubao-seedance-2.0","prompt":"A product video","duration":5,"resolution":"480p","aspect_ratio":"16:9"}'

Codex CLI

Claude + ChatGPT
# Codex CLI uses the OpenAI-compatible format export OPENAI_BASE_URL=https://tryaiapi.com/v1 export OPENAI_API_KEY=your-infwave-key codex

LangChain

All Claude models
from langchain_anthropic import ChatAnthropic llm = ChatAnthropic( base_url="https://tryaiapi.com", api_key="your-infwave-key", model="claude-sonnet-4-6", )
FAQ

Frequently asked questions

How do I verify I am using the real model?
Each response carries the upstream native fields (Anthropic request_id, OpenAI id and system_fingerprint), identical to a direct upstream call. Visit the transparency page to inspect the database schema and confirm we do not store prompt or response bodies.
How is billing handled?
Text models are billed by token usage. Visual models are billed by task, duration, and upstream model. The console shows real-time balance, usage detail, and exports grouped by model / date / key. Bank transfer and VAT invoice are supported.
Do you store my prompts and responses?
The text channel does not persist prompt or response bodies in the regular database layer. Visual models are async tasks: task parameters, status, cost, result URLs, and failure reasons are kept for task tracking and billing. The full boundary is on the transparency page.
Do you support streaming?
Text models support Anthropic-native SSE streaming and OpenAI-compatible streaming — set "stream": true in the request. Visual models are not streaming responses; submit a task, then poll /v1/video/generations/{task_id} for the result.
How do I call visual models?
Use the same API key to call POST /v1/video/generations. The response returns job_id and poll_url. After completion, the polling response or "Visual model usage detail" shows the result, download URL, and failure reason.
How does this differ from calling Anthropic / OpenAI directly?
The text channel preserves the Anthropic / OpenAI compatible protocol surface (streaming, tool calling). Visual models are unified across multiple upstream providers through the Infwave async task endpoint. The difference: a single key, balance, and usage record across all of them, plus CNY bank transfer and VAT invoice support.