/v1/models
Query current callable model IDs before integrating. ChatGPT model IDs follow this list.
Integration guide for the IWKey unified gateway: available models, quick start, endpoints, code examples, SDK setup, and FAQ.
One place for Claude, ChatGPT, and video model endpoints, model ID lookup, and status; see the models page for the full catalog.
Model IDs are sourced from GET /v1/models; live pricing and groups are on the model market.
API definition: /docs/openapi.json. Model details follow live /v1/models and the model market.
Last updated: 2026-10-13
Text models swap the SDK base URL; video models submit tasks through /videos/v1/videos/generations.
Text requests return in real time; video tasks are polled until complete, then results can be downloaded and roll up into usage records.
Last updated: 2026-09-04
/v1/modelsQuery current callable model IDs before integrating. ChatGPT model IDs follow this list.
/v1/chat/completionsOpenAI-compatible endpoint. After swapping the base URL, the OpenAI SDK, Cursor, Codex CLI, opencode, and LangChain can all call through here.
/v1/messagesAnthropic Messages-native endpoint. Claude Code and the Anthropic SDK can switch directly to the IWKey base URL.
/videos/v1/videos/generationsVideo model async task endpoint. Submit a prompt, duration, resolution, and aspect ratio to receive a job_id and poll_url.
/videos/v1/videos/jobs/{job_id}Prefer the poll_url returned by submission; it provides task status, completed output, failure details, and the video download URL.
/videos/api/v3/contents/generations/tasksVolcano Ark native-format entry for video models. model accepts the official IDs (doubao-seedance-2-0-260128 / doubao-seedance-2-0-fast-260128 / doubao-seedance-2-5-260628); unsupported top-level parameters return an explicit error and are never silently dropped.
/videos/api/v3/contents/generations/tasks/{id}Ark native-format task query entry; returns Ark status values (queued / running / succeeded / failed / cancelled / expired). On success content.video_url is the generation engine's official link (typically valid ~24 hours), identical to video_url on the standard endpoint. When a platform copy exists, content.platform_video_url and content.platform_expires_at are also included (kept for 7 days on our side; these two fields are returned additionally by this platform and are absent from the Ark native format).
Developers already using the Volcano Ark native request format can use the Ark-compatible endpoint above directly; see the specific differences from Ark native in the Video Model API Integration Guide's "Ark-compatible endpoint: differences from Ark native".
Last updated: 2026-09-24
Advanced text capabilities and video model async task examples — each scenario shown in cURL / Python / JavaScript.
| Parameter | Type | Description |
|---|---|---|
model |
string | doubao-seedance-2.0 / doubao-seedance-2.0-fast / doubao-seedance-2.5 / MiniMax-H3 |
prompt |
string | Text prompt, required |
duration |
integer | Duration in seconds: doubao-seedance-2.0 / doubao-seedance-2.0-fast and MiniMax-H3 are 4–15, doubao-seedance-2.5 is 4–30 |
resolution |
string | Per model: doubao-seedance-2.0 takes 480p / 720p / 1080p / 4k; doubao-seedance-2.0-fast takes 480p / 720p; doubao-seedance-2.5 takes 480p / 720p / 1080p; MiniMax-H3 takes 768p / 2k |
image_urls |
array ≤9 (≤30 for doubao-seedance-2.5) |
Reference images. Each item is either a URL string (default role = first_frame, image-to-video) or an object {"url":"…","role":"first_frame|last_frame|reference_image"} |
video_urls |
array ≤3 (≤10 for doubao-seedance-2.5) |
Reference videos |
audio_urls |
array ≤3 (≤10 for doubao-seedance-2.5) |
Reference audio; doubao-seedance-2.5 accepts audio on its own; for doubao-seedance-2.0, doubao-seedance-2.0-fast and MiniMax-H3 it cannot be used alone — must pair with a role:"reference_image" image or video_urls; first/last-frame images cannot be combined with audio |
generate_audio |
boolean | Whether output includes audio, default false |
Billing: pre-held on submission, then settled on actual usage, with any difference refunded or charged; failed tasks are fully refunded.
| Field | Description |
|---|---|
video_url |
Original video link from the generation engine, valid for about 24 hours (expires_at is the authoritative expiry). |
platform_video_url |
Platform storage link, kept for 7 days from job completion; once expired the file is deleted and cannot be recovered. null when the job has no platform copy — use video_url instead. |
platform_expires_at |
Expiry time for platform_video_url. |
The platform uses official standard model IDs. Reasoning depth is controlled via API parameters — Anthropic uses the thinking object, OpenAI uses reasoning_effort.
Last updated: 2026-09-29
ANTHROPIC_BASE_URL must stop at the hostname https://iwkey.com — do not add /v1 (unlike OpenAI; adding it would form /v1/v1/messages → 404)/v1 (Cursor appends /chat/completions directly to this OpenAI-protocol endpoint — unlike Claude Code's ANTHROPIC_BASE_URL, which does not take /v1)base_url must stop at /v1 — do not add /chat/completions, or Codex will build a bad path and return 404gpt-6-sol. Codex uses the Responses API (not chat/completions) — declare wire_api = "responses" in config.tomloptions.baseURL must include /v1 — @ai-sdk/openai-compatible appends /chat/completions directly and does not add /v1 for youLast updated: 2026-10-13
Video generation is asynchronous with asset library support. See the dedicated guide: /en/docs/video-model/ (same API key, same base URL).
POST /videos/v1/videos/generationsPOST /videos/v1/videos/generations/estimateGET /videos/v1/videos/jobs/{job_id}GET /videos/v1/videos/jobsGET /videos/v1/videos/jobs/statsGET /videos/v1/videos/jobs/export.csvLast updated: 2026-10-20
Check it before you start making calls, or from your own scheduler, to warn early when the balance is low, so requests are not rejected midway for insufficient balance. Read-only; querying is free.
GET https://iwkey.com/v1/usageapi.infwave.com works too. Authenticate with the same API key you call models with: Authorization: Bearer <your key> (the x-api-key header is also accepted).
What you get back depends on the key: the same endpoint returns different things for the three kinds of key below, so confirm which one you use before integrating.
| Key type | What is returned |
|---|---|
| Regular key | The account's wallet balance: planName is a fixed wallet-balance label (returned in Chinese; the example above omits it), balance / remaining hold the balance, and unit is USD |
| Key with a quota cap or rate limit | That key's own remaining quota, not the account balance |
| Key in a subscription-plan group | The plan's remaining allowance, plus daily / weekly / monthly usage, the matching limits and the expiry time |
All three also include usage: today's and cumulative requests, tokens and cost, plus rpm and tpm.
Polling frequency: balances change slowly, so querying once an hour is enough.
Set a User-Agent when calling from code: when you call from Python or similar, send a User-Agent header; otherwise the request may be blocked by Cloudflare (a 403, or a failed connection). curl is not affected. The example script below already sets one.
Get notified early when the balance runs low, so calls are not interrupted by insufficient balance. Run a scheduled job that calls the endpoint above once an hour and, when the balance falls below your own line, sends the alert to your Feishu group, DingTalk group, WeCom group, phone (SMS), Telegram or another channel. The example uses only the Python standard library; the NOTIFY_CHANNEL environment variable switches between Feishu, DingTalk, WeCom and Telegram, and SMS goes through your own SMS provider (see the table).
| Platform | Prepare first | Environment variables |
|---|---|---|
Feishu (feishu) | Add a “Custom Bot” to the group and copy its webhook URL; if the bot has “Signature verification” on, copy its secret too | FEISHU_WEBHOOK; add FEISHU_SECRET if signature verification is on |
DingTalk (dingtalk) | Add a “Custom Robot” to the group and copy its webhook URL; if you chose “Sign” in its security settings, copy the secret too | DINGTALK_WEBHOOK; add DINGTALK_SECRET if “Sign” is on |
WeCom (wecom) | Add a “Group Bot” to the group and copy its webhook URL | WECOM_WEBHOOK |
| SMS | Sign up with an SMS provider such as Alibaba Cloud SMS or Tencent Cloud SMS and get a sender signature and message template approved first. The example does not include SMS; replace its send function with your provider's send API | As required by your provider (e.g. access key, signature, template ID, recipient phone number) |
Telegram (telegram) | Create a bot with @BotFather to get its token, add the bot to the target group or chat, and get the chat_id. Servers in mainland China usually cannot reach Telegram directly; you need a network that can | TG_BOT_TOKEN, TG_CHAT_ID |
Also set IWKEY_KEY (the API key you call models with); LOW_USD / CRIT_USD are the low / critical lines in US dollars, defaulting to 40 / 10. Treat the webhook URL and bot token like passwords and do not share them. The example reads balance: for a regular key that is the account wallet balance; for a key with a quota cap it is that key's remaining quota, so read your alert line accordingly; keys in a subscription-plan group return a different structure and are not covered by this example. Behaviour of the example: one alert each for Low and Critical, with no repeats inside a tier; it counts as recovered only after the balance climbs back above 1.2 times the low line; a failed query is not treated as a low balance, and three failures in a row raise a “monitor is down” alert; a message that fails to send is not recorded and is retried on the next run. Run it hourly with crontab: 0 * * * *.
Last updated: 2026-10-12
request_id, OpenAI's id and system_fingerprint). Text requests store no prompts or completions; see the transparency page for the full boundary.
"stream": true in the request. Video models are not streaming responses; after submission, prefer the response's poll_url. Its current path is /videos/v1/videos/jobs/{job_id}.
POST /videos/v1/videos/generations. The response returns job_id and poll_url. After the task completes, check the polling response or "Video Model Usage" for the result, download URL, and failure reason.
-thinking/-high/-low are not offered. Reasoning depth is controlled via API parameters:
claude-opus-5-5, claude-sonnet-5-5 and claude-fable-5-1, add "thinking": {"type": "adaptive"} and set depth with "output_config": {"effort": "high"} (options: low/medium/high/xhigh/max)."reasoning_effort": "high" to the request body (options: low/medium/high). Supported models: gpt-6-sol and others — check GET /v1/models to confirm./v1/messages format and mark cache_control breakpoints in the messages or system prompt. Note: the OpenAI-compatible /v1/chat/completions format does not support Claude prompt caching — every request is billed at full input price.
Last updated: 2026-10-08