Create Job
Queue an inference job.
Answers 202 with the job, which by default is still queued: enhancement runs on the fleet rather than in this request, and a large job can take minutes. There are three ways to collect the result, and the first is usually the one you want:
- Set wait and this call holds the response open for that many seconds, up to 30. A job that finishes inside the window comes back finished, with its output, and needs no second call at all. One that does not comes back queued or running, exactly as if you had not asked.
- Poll GET /v1/jobs/{id}.
- Supply a webhook_url and let the result come to you.
The status code is 202 either way, including when the job is already finished: it says the submission was accepted, not that the work is still outstanding. Read status for that.
Send an Idempotency-Key header to make retries safe: a repeat with the same key returns the original job instead of running inference again.
Send a custom_id to have your own identifier come back on every read of this job and on the webhook, so a result can be matched to your record without keeping a table of ours. It is a label: not interpreted, not required to be unique, and not a key jobs can be looked up by. It is not the Idempotency-Key — that one decides whether a job is created at all.
Send input_megapixels — the size of the file you uploaded — and eta_seconds is estimated for your file rather than for a typical one. It is advisory: the price, the queue and the size limits are decided from the file itself.
Request
- Base URL: https://api.craterview.ai
- URL: https://api.craterview.ai/v1/jobs
- Auth: HTTP bearer
Query parameters
Seconds to hold the response open waiting for the job to finish. A fast job then needs no polling at all; if it is still running when the time is up you get the queued/running job back as usual.
Headers
Makes a retry safe: a later request with the same key and the same body answers with the job the first one made, instead of making another; the same key with a different body is refused. Any value of your own, up to 255 printable ASCII characters — a UUID is a good choice. Keys are your API key's own, so another caller's cannot collide with yours.
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.