Skip to main content
POST
Generation submission placeholder / 生成提交预览
API preview: generation providers are not connected. An authenticated request can return 503 without creating a task or charging credits.

Start with the preview

APIstable is being built in two stages: the website, account system, and execution architecture first; real model providers next. The model catalog and prices currently illustrate the contract. They are not a claim that paid inference is available. Examples on these pages describe the API preview. A provider-not-configured response is expected until a route is enabled. Copying a code example does not execute it or spend credits. Explore the model catalog

What works in this build

OpenAPI JSON LLM-readable guide

1. Create an API key

Sign in and open Console → API Keys. Save the complete key when it is created; it is only revealed once. Use a separate key for each app or environment.
Replace the example origin with your APIstable deployment. API keys belong in your server environment, never in browser code, query strings, or public repositories.
Manage API keys

2. Quote, then submit

Choose an exact model ID and validate the input. A quote shows the eligible low-cost and official routes, the price per result, and the maximum reservation for the whole request. Direct API clients may submit without a separate quote call; the server still calculates and validates the price. For images and videos, output_count creates 1–4 result items. fallback is off by default. When enabled, each item can independently try the official route after a confirmed eligible failure. Create a task Understand credits

3. Keep the task ID

An accepted media request returns HTTP 202 and a stable task_id. Keep it and query that task instead of submitting again. A network timeout does not tell you whether the supplier accepted the generation.
  • Poll at a sensible interval and respect Retry-After. Check queued, running, falling_back, and reconciliation_required as non-final states.
  • Read each item, including successful results in a partially completed task. Download files before expires_at.
  • A failed notification does not invalidate a completed generation or repeat its charge.
Query a task

Authorizations

Authorization
string
header
required

API key beginning as_. Keep on the server. Scope permissions are checked separately.

Headers

Idempotency-Key
string

Reserved for live acceptance. No task is currently created or deduplicated by this header.

Body

application/json
model
string
required
Minimum string length: 1
Example:

"prism-image-2"

input
object
required

Current preview input. Supported fields vary by modality and exact catalog model. No live provider mapping is implied.

output_count
integer
default:1

Target result count. Images/videos accept 1–4; music and LLM must remain 1. Not a concurrency guarantee. / 目标结果数,非同时并发保证。

Required range: 1 <= x <= 4
fallback
boolean
default:false

Authorizes a higher-priced compatible official fallback after an eligible confirmed failure. Live execution is disabled in this build.

max_credits
integer

Whole-request reservation cap. Reject the entire request when max_reserved_credits exceeds it.

Required range: x >= 0

Response

Invalid or unsupported input

error
object
required