Generation Tasks API Overview
Generation tasks produce video, music, or images that take time to complete. Call the API directly or combine its endpoints in tools such as n8n and Dify.
Check access before you start
Prepare a valid API Key, sufficient balance, and a target model enabled for your account. An endpoint's existence does not mean every model is available. Check the model catalog or the model's instructions for its protocol, required parameters, and billing method.
| What you need | Guide | Task identifier |
|---|---|---|
| OpenAI-compatible video generation | Video Generation and Downloads | id in the submission response |
| Music and lyrics | Music and Lyrics | data in the native submission response |
| Midjourney images and follow-up actions | Midjourney Images | result in the submission response |
| Unified task queries and multiple artifacts | Generic Tasks and Artifacts | task_id |
| Background submission in Responses format | Background Responses | resp_...; also keep metadata.task_id |
Identifiers and status fields differ between endpoints. Save the actual submission response; do not invent task identifiers from the examples.
Authentication and URLs
Full URLs in this chapter combine https://certaedge.com with the relevant endpoint path. Include this header in REST requests:
Authorization: Bearer sk-YOUR_API_KEYFor JSON submissions, also set Content-Type: application/json. Replace the placeholder with your complete API Key and keep one space after Bearer.
The Bash examples work on macOS, Linux, or WSL. First set the key in your current terminal:
export CERTAEDGE_API_KEY='sk-YOUR_API_KEY'On Windows PowerShell, use curl.exe as described in the custom application guide, or use that page's Python polling example. Do not paste Bash backslash line continuations directly into PowerShell.
Complete a task
- Submit once, check both HTTP and application-level status, and save the public task ID.
- Query the original task at intervals without resubmitting it.
- On success, read the result or artifact list. On failure, read the error details.
- Save files you need to keep and check task logs and usage.
Use a valid API Key from the same account for submission, polling, and downloads. Generation, resubmission, and follow-up variations may each incur charges. See Status, Polling, and Billing for waiting and failure handling.
Learn through your tools
- n8n: combine HTTP Request, Wait, and conditional branches.
- Dify: use an LLM to prepare a prompt, then submit it through an HTTP node.
- Custom applications: retrieve results with a polling script that has a limit.
Ordinary chat clients and coding assistants may not handle media tasks directly. Entering a video model ID in a chat model field does not complete the integration.