Async task integration
Async task integration
A standard request lifecycle for image, video, audio, and 3D generation.
The task API accepts a model's inputs, returns a task ID, and lets your application retrieve the result when processing finishes.
Integration flow
- Create an API key with task access.
- Choose an authorized model and read its detailed input requirements.
- Submit one task with a stable idempotency key.
- Poll the returned task ID until it reaches a terminal state.
- Save the returned results in your application.
Start building
| Guide | What you will learn |
|---|---|
| Quickstart | Create a task and retrieve its output with curl, Python, or JavaScript. |
| Authentication | Configure API keys, products, and scopes. |
| Task lifecycle | Interpret progress, terminal states, result fields, and expiry. |
| Model selection | Resolve a public model identifier and find its detailed documentation. |
| Errors and retries | Recover from failures without accidentally submitting duplicate work. |
| API reference | Look up the exact task, status, and model-list operations. |
Public endpoints
Use https://api.musespark.ai as the API origin. Task endpoints begin with /api/v1/openapi.
Successful responses use the JSON envelope {"code":200,"msg":"success","data":{...}}.
The native LLM gateway has a separate protocol integration module.