API v1

FAQ

Common questions about charges, failures, how long results stay and API keys.

View Markdown
On this page

If your question is not here, contact us with the trace_id or the task ID.

Charges

Are failed tasks charged?

No. Once a failed or cancelled task is settled, its final charge and amount due are zero and the whole reservation is released. See How billing works.

Why is the reservation larger than the final charge?

At creation we reserve the largest usage the request can produce; after completion the task is settled on actual usage and the rest returns to your balance.

Tasks

My request timed out. Should I send it again?

Yes, with the same body and the same Idempotency-Key. If the last attempt in fact succeeded, you get the original task back, and nothing is created or charged twice. See Idempotency and retries.

Can I cancel a task that is generating?

Only before generation starts. After that, cancelling returns not_effective and the task continues and is settled as usual.

How long can I download a result?

The result is kept until expires_at, 7 days after it is ready by default. Each task read returns a fresh url that works for up to 24 hours and never after expires_at. Save the file to your own storage in time; after expires_at url is null.

Why does a task return task_not_found?

Tasks are separated by team. An unknown task ID and one of another team both return 404 task_not_found.

API keys and callbacks

What if an API key leaks?

Suspend it at once on the API keys page of the console, create a new one and replace the value on your servers.

Why didn't a callback arrive?

Check that the callback address is verified and not removed in the console, and that callback_url matches it byte for byte. Failed deliveries are retried for 7 days, and the console shows the delivery records. Whether or not a callback arrives, the task's status and result come from reading the task.

Next steps