AIShow API Tutorial: Generate Video & Image from Code
The AIShow Open API lets you trigger AI video and image generation from your own apps, scripts or backends. This tutorial walks through the full lifecycle: authenticate, submit a job, poll for status, and fetch the result. Full reference lives in the API documentation.
1. Get your API key
Create an account, open the API section in your dashboard, and generate a key. Keep it secret — it carries your credit balance. Send it in the Authorization header as a Bearer token.
2. Submit a generation
POST your prompt and chosen model to the generations endpoint. A minimal video request looks like this:
curl -X POST "https://www.aishow.uno/v1/video" \
-H "Authorization: Bearer $AISHOW_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model-code",
"prompt": "A calm lake at sunrise, mist rising, cinematic",
"duration": 5,
"resolution": "720p"
}'
The response returns a task_id you use to track the job. No credits are spent until the task actually succeeds.
3. Poll for the result
Generation is asynchronous. Poll the task status endpoint every few seconds:
curl "https://www.aishow.uno/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $AISHOW_KEY"
States are typically pending → running → succeeded or failed. On succeeded, the response includes the output URL.
4. Handle failures gracefully
If a task fails, AIShow does not charge you — credits are returned automatically. In your code, treat failed as "no cost, try again or notify the user." This makes retries safe to build.
Putting it together
A typical flow: store the task_id, poll on a timer or webhook, and once succeeded, download or display the asset. Because billing is per-success and transparent, you can let users generate freely without surprise invoices.
Ready to build? Grab your key and start from the Studio to compare models before wiring up the API.