Create from
your application.
Prepare server-side integrations for text-to-image and text-to-video generation. API sales are activated separately by the administrator. Customers purchase prepaid Studio credits through Stripe in MYR; model, resolution and duration determine consumption.
Commercial use and API licensing
Build your own paid SaaS or application using your private backend integration. You may charge for your application and generated deliverables. Selling API keys, raw API access or a pass-through API gateway is prohibited. Read and accept the API terms when creating a key.
1. Prepare your account
Sign in, complete any required password change, buy a credit pack when checkout opens, and create a key in Settings → Developer API keys. Keep keys on your server and send Authorization: Bearer YOUR_STUDIO_API_KEY. Never put a key in frontend code.
2. Choose and quote
GET /api/v1/models lists available model IDs, native formats, resolutions and durations. POST /api/v1/quote returns required credits and their nominal RM equivalent. Actual pack price per credit varies. Use the same settings when submitting.
GET /api/v1/balance returns your available prepaid credits.
3. Submit one generation
POST /api/v1/generations accepts a JSON body with model, format, resolution, prompt and duration_seconds for video. Include a unique Idempotency-Key header, 8–100 letters, digits, underscores or hyphens. Retry uncertain requests with the same key and unchanged body to prevent duplicate submission.
{
"model": "MODEL_ID_FROM_MODELS_ENDPOINT",
"format": "FORMAT_VALUE_FROM_MODELS_ENDPOINT",
"resolution": "RESOLUTION_FROM_MODELS_ENDPOINT",
"prompt": "A premium product photograph with warm studio lighting"
}4. Track and download
Poll GET /api/v1/generations/JOB_ID. When completed, download GET /api/v1/generations/JOB_ID/asset using the same Bearer key. Asset URLs require authentication; download them on your backend before serving them to customers.
Limits and billing
Quotes do not reserve credits. Submission checks current pricing, account access, the prepaid balance and the service budget. Successful submission reserves credits; failed generation uses existing refund rules. Unknown outcomes remain held for review. HTTP 401 means an invalid/revoked key, 402 insufficient credits, 403 unavailable account access, 409 request conflict or a generation gate, 429 daily request cap, and 503 API sales paused. Status polling and downloads also count toward the daily request allowance; poll conservatively.
This first API release supports text prompts only. Upload references, avatars, music, voice and chat workflows remain in the studio. Gross margin targets exclude payment fees, hosting and taxes. API keys are tied to your account and stop working when revoked, when access is disabled or after a password change.
Prepare API access ↗