Этот технический документ доступен на английском языке. Интерфейс использует выбранный вами язык.
Creator API: quotes, tasks and media
Capabilities · Playground · History · My assets · API keys · OpenAPI
Cloud services provide media. Local tools continue to own projects, timelines and final rendering. The model catalog reports implementation, configuration, real verification and commercial availability separately. New suppliers are disabled by default. ASR, cloned voices, avatars, payments and customer webhooks remain future work.
Generate media
- Send
capability,modeland structuredinputtoPOST /api/v1/quotes. A quote lasts ten minutes and does not generate or charge. - Send the returned normalized input, quote_id and max_credits to
POST /api/v1/generations, with a stableIdempotency-Key. Replaying the same operation returns its existing task; different input with the same key returns409. - Observe
GET /api/v1/tasks/{id}. Only validated, stored outputs are delivered and charged. Partial image batches are charged per delivered image. - Read
GET /api/v1/tasks/{id}/receiptfor the price version, reservation, capture, release and refunds. - Download your media from
GET /api/v1/assets/{ast_id}/download. Single byte ranges are supported. Always keep API keys in the Authorization header.
{"capability":"images.generate","model":"native-image","input":{"prompt":"Geometric background","size":"1024x1024","count":1}}
Supported parameters, voices and dimensions are listed in the model catalog. Unsupported options are rejected. Existing POST /api/v1/images retains its synchronous fields and numeric asset URLs, using the same task and billing pipeline internally. A completed legacy request can also be replayed with its original idempotency key.
The catalog's price_options lists configured prices. Video may have separate 480p, 720p and 1080p tiers; its legacy price field is then null. Request a quote for the exact input rather than assuming the lowest price applies. Omitted video resolution defaults to720p. Submit the quote's normalized input; its recorded version and charge cap survive later price changes. Pages show every tier, and TEST marks fixture prices.
Credits and recovery
Credits are usage allowances funded by purchases, released payment rewards and historical ledger entries. There are no monthly, signup, email-verification, visit or wish-submission gifts. Paid top-ups or template purchases earn the buyer and eligible inviter 5% each of the paid amount converted to credits (CNY 1 = 10 credits, rounded down). Rewards appear as locked after payment with an expected release date. They become spendable after 14 days, verified email and a signed provider check confirming no refund or payment exception. Refunds block or reverse rewards. Historical orders do not receive new rewards. A reservation reduces spendable balance once; it is not a completed debit. Historical free-credit releases do not recreate the cancelled allowance. Old and new APIs share one balance.
Images use delivered image counts. Standard voiceovers use normalized Unicode codepoints, including punctuation and internal whitespace, rounded up per100 characters. P1 video uses the configured fixed-duration contract. Supplier usage and original-currency costs are separate records; missing costs are unknown, never assumed zero. Your quote caps the charge.
Cancellation requires usage.read plus the task’s generation scope and model permission; read-only keys cannot change task state. Queued work can be cancelled immediately. Submitted work may continue and incur the quoted charge. reconciling retains its reservation while the supplier result is uncertain. A confirmed upstream ID is queried; paid work is never blindly resubmitted. Without supplier lookup or idempotency, the service cannot promise exactly-once network execution. An administrator resolves unknown submissions using supplier evidence.
A new generation in the Playground requires a new quote and is a new operation. Revoked keys cannot submit or download again, and revocation cannot be undone. Account owners can still view their own records through their signed-in pages.
Keys, sources and retention
Choose scopes, expiry, budgets and model restrictions when creating a key. Historical keys keep their old image, sticker, production, asset-read and usage permissions. New video, voiceover, external search and upload permissions require explicit selection. Private pages are not cached; the raw key is shown only at creation.
Model allowlists apply to generation, media search and selection, including Playground's selected key. Legacy sticker search, matching and downloads check the local-stickers model permission as well. Reading your existing assets requires assets.read and ownership.
Unified search supports image, video, music, sfx and sticker. Source references are owner-bound and expire after ten minutes. Selection requires a server-issued reference and purpose=local_creation. Pixabay searches are cached for24 hours. Unsplash selection records its download event and retains a hotlink rather than mirroring the file. Pexels attribution is preserved. Search results do not guarantee commercial rights or permission to resell a library.
Existing stickers use kind=sticker&provider=local. Unreviewed rights are returned as unknown. The legacy sticker file endpoint charges one credit per successful HTTP request, including repeated downloads, and requires stickers.file. Generated-media downloads do not charge again. Music/SFX appear only in an evidenced allowlist permitting commercial use, adaptation and standalone redistribution; missing, unknown, NC or ND rights are excluded.
Personal media is private and expires after30 days. Upload sessions expire after ten minutes; files are limited to32MB, images to16MB. Media signatures, actual specifications and ownership are checked before delivery. Deletion and expiry stop media access while preserving necessary receipts and hashes. Completed raw task input is cleared after seven days; safe specifications remain. Quotes store fingerprints only. Supplier and backup retention follows the applicable operator policy.
History, HTTP requests, transactions and assets are owner-only and paginated, at most50 items per page. CSV export includes the latest1,000 transactions and escapes spreadsheet formulas. Historical records remain on the API Keys page; unknown historical costs are not invented.
Supplier concurrency, account limits, daily budgets and separate search/upload limits apply. New suppliers require enabled-model, credential, rights, real-verification and price gates. Unconfigured services report their actual state and cannot return simulated production success.