Generic Tasks and Artifacts
The generic task API is useful for applications that handle multiple generation services through a common interface. Authenticate with your own model API Key and access only tasks belonging to the same account.
Submission and query paths
| Action | Method and path |
|---|---|
| Submit to an enabled task service | POST /v1/tasks/{service} |
| Query task status | GET /v1/tasks/{task_id} |
| List artifacts | GET /v1/tasks/{task_id}/artifacts |
| Download a selected artifact | GET /v1/tasks/{task_id}/artifacts/{artifact_key}/content |
For submission, the first path parameter is a service identifier such as sora. For queries, that position contains the task ID returned by submission. Check the enabled model's instructions for its service identifier; do not substitute a model ID.
Submission example
This example is only for enabled Sora-style text-to-video models. Create task.json. Other services require their own parameters:
{
"model": "YOUR_VIDEO_MODEL_ID",
"prompt": "A steady shot of a lake at sunrise, with light mist in the distance.",
"seconds": "4",
"size": "1280x720"
}curl -sS -X POST https://certaedge.com/v1/tasks/sora \
-H "Authorization: Bearer $CERTAEDGE_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @task.jsonSave task_id from the response. The request body must include a model that belongs to the selected service and is enabled for your account. This endpoint primarily accepts JSON. For file uploads, prefer a native or video endpoint explicitly supported by the model.
Query a common set of statuses
export CERTAEDGE_TASK_ID='task_EXAMPLE'
curl -sS "https://certaedge.com/v1/tasks/$CERTAEDGE_TASK_ID" \
-H "Authorization: Bearer $CERTAEDGE_API_KEY"The response includes fields such as task_id, platform, status, progress, and fail_reason. This API uses uppercase task statuses: NOT_START, SUBMITTED, QUEUED, and IN_PROGRESS mean the task is unfinished; SUCCESS means it succeeded; FAILURE means it failed.
Do not treat UNKNOWN or an unrecognized status as success. Save the task ID and investigate. Do not use the video API's lowercase status values to evaluate this endpoint.
List and download artifacts
After a task succeeds, list the files that are actually available:
curl -sS "https://certaedge.com/v1/tasks/$CERTAEDGE_TASK_ID/artifacts" \
-H "Authorization: Bearer $CERTAEDGE_API_KEY"| Response field | Meaning |
|---|---|
artifacts[].key | Artifact identifier within this task; use it unchanged when downloading |
artifacts[].type | For example, video, audio, or image; inspect the actual response |
artifacts[].mime_type | Media type of the file; may be omitted |
artifacts[].content_url | Content URL generated by the service; may contain access credentials, so do not share it publicly |
The list may contain multiple artifacts. It may also be empty for unfinished tasks, older tasks, or services that provide no files. An empty array does not mean an empty file was successfully downloaded.
Copy key from the actual artifact list and download the corresponding file. Choose an extension that matches the media type. If artifact.bin already exists, rename and save it first:
export CERTAEDGE_ARTIFACT_KEY='YOUR_ARTIFACT_KEY'
curl --fail -L "https://certaedge.com/v1/tasks/$CERTAEDGE_TASK_ID/artifacts/$CERTAEDGE_ARTIFACT_KEY/content" \
-H "Authorization: Bearer $CERTAEDGE_API_KEY" \
--output artifact.binAn unfinished task may return artifact_not_ready. Handle a missing artifact as an error; do not save error JSON as a media file.
For common handling across services, see the status table, n8n branching workflow, and Python polling example.