Executions and results
A quote fixes the input, version and cost. An idempotency key tracks each execution.
Use file_index on the original execution to get a download link. You can reuse a public link while the file is retained. A private link expires at expires_at. If the file is still available, request a fresh link with the same execution ID and file index. Upstream file retention varies by provider.
Three result delivery modes
When the mode is variable, read execution_mode on the selected model or quote, then use the matching delivery method below.
| Mode | Invocation | Getting the result |
|---|---|---|
| Sync | Optionally pass wait_ms when executing | An unfinished execution returns 202; then query its record |
| Async | Submission immediately returns an execution ID | The server polls the upstream task; the client polls the execution |
| Stream | Connect to events immediately after submission | SSE events and the final execution record |
curl "https://api.anyuse.app/v1/executions/EXECUTION_ID" \
-H "Authorization: Bearer $ANYUSE_API_KEY"Streaming audio
event: audio
data: {"type":"audio","audio_base64":"BASE64_CHUNK","mime_type":"audio/mpeg"}
event: done
data: {"type":"done","status":"succeeded","cost_usd":"ACTUAL_COST_USD"}Decode each audio chunk and concatenate the bytes, not the base64 strings. The complete audio is saved in result.data.audio_base64. Only one event consumer is allowed per execution. Streams cannot resume after disconnection; query the execution record instead.
Status and billing
dispatching、running indicate an execution in progress.succeeded indicates success. See cost_usd for the final charge.unknown means the result is under review. No charge applies.
Cancellation
Only tasks with can_cancel=true accept cancellation. File transcription does not support cancellation: the endpoint returns 409 and the task continues, so keep polling it. A cancellation request still needs a final outcome; an incomplete execution is free.