Skip to main content

Get a Job

Use this request to check an x402 job's status and read its result. It's the same free request the Jobs API uses, so it needs no payment, wallet signature, or API key. This page covers only what differs for x402 jobs. For everything else, see Get a Job in the Jobs API and Output and Add-ons.

Endpoint​

GET https://api.speechischeap.com/v2/jobs/:job_id

Don't add a trailing slash; a request to /v2/jobs/:job_id/ returns 404 Not Found. Use the job id from the accepted job response. A purchase_id isn't a job ID, so this endpoint returns 404 Not Found for it.

Authentication​

None. Anyone who has a job ID can read the job, so keep job IDs private.

Request​

ParameterTypeDescription
output_formatstringReturns a completed job's transcript as srt, vtt, or webvtt instead of JSON. Jobs that haven't completed always return JSON.

Example Requests​

curl https://api.speechischeap.com/v2/jobs/00000000-1111-4222-8333-555555555555-sic
curl 'https://api.speechischeap.com/v2/jobs/00000000-1111-4222-8333-555555555555-sic?output_format=srt'

Response​

The status codes, job states, and completed bodies are the same as in the Jobs API. An x402 job differs in these ways.

Failed Job​

A failed or canceled x402 job returns its error message in output.error. A failed API-key job returns an empty output and sends its message only to the webhook.

{
"id": "00000000-1111-4222-8333-555555555555-sic",
"output": {
"error": "Expected at most 300 seconds; got at least 301 seconds",
"duration_error": {
"code": "INPUT_DURATION_MISMATCH",
"min_input_duration": 6,
"max_input_duration": 300,
"actual_input_duration": 301,
"actual_duration_is_lower_bound": true
}
},
"status": "FAILED"
}

output.error is a human-readable message that can change. duration_error appears when the file is shorter than six seconds or longer than the purchased allowance. The service refunds a failed job in full.

FieldDescription
codeAlways INPUT_DURATION_MISMATCH.
min_input_durationThe shortest duration the service accepts, in seconds.
max_input_durationThe purchased allowance, in seconds.
actual_input_durationThe measured duration, in seconds.
actual_duration_is_lower_boundtrue when measuring stopped early, so the file is at least that long.

Pending Until the Result Is Saved​

A job reports PENDING until the service has saved its result, even if a replay of the paid request already reports COMPLETED. Treat this request as the source of truth for a result.

Purchases Without a Job​

A purchase that ended before a job existed has no job to read. Its status is FAILED or EXPIRED, and it has no id. Replay the paid request to see its status, or use your webhook.

Errors​

This endpoint returns the errors listed under Jobs API errors. The most likely are 404 Not Found for an unknown job ID or a purchase_id, and 400 with Invalid output_format specified. for a completed job.

Notes​

  • Polling works as in the Jobs API: request the job every few seconds until its status is COMPLETED, FAILED, or CANCELED.
  • Private jobs follow the same 12-hour rule as in the Jobs API. The service also stops delivering a private job's outcome to your webhook after 12 hours.