API docs

Errors

This page lists every error the API sends, the codes of failed jobs, and when to retry.

The error body

Every error answer has this body:

{
  "error": {
    "message": "trajectory requires depth.",
    "type": "invalid_request_error",
    "param": "trajectory",
    "code": "invalid_request_error"
  }
}

All four keys are always present.

typeStatuses
authentication_error401
rate_limit_error429
server_error500 and above
invalid_request_errorEvery other status

Statuses and codes

Retry-After is a header that holds a whole number of seconds. "None" means the answer has no Retry-After header.

StatustypecodeRetry-AfterWhen
400invalid_request_errorinvalid_request_errorNoneThe request breaks a rule. param and message say which.
400invalid_request_errornullNoneThe request has no Host header, or it is not valid HTTP/1.1.
401authentication_errorauthentication_errorNoneThe API key is missing, malformed, unknown or revoked.
403invalid_request_errorhttps_requiredNoneThe request was sent in clear text.
403invalid_request_erroroperation_pausedNoneYour organisation is paused. It cannot create batches or get file links until it is unpaused. Its jobs whose work was running are stopped, and they fail with operation_paused.
404invalid_request_errornullNoneThe id names nothing of your organisation, or the path is not a route.
405invalid_request_errornullNoneThe path does not accept the method.
408invalid_request_errornullNoneThe request did not arrive in time.
409invalid_request_erroridempotency_conflictNoneThe Idempotency-Key was already used with another body.
409invalid_request_errorresult_unavailableNoneThe job has not completed, or it failed.
410invalid_request_errorresult_expiredNoneThe result has expired.
410invalid_request_errorresult_deletedNoneThe result was deleted.
413invalid_request_errorrequest_too_largeNoneThe body of POST /batches is larger than 8 MiB.
417invalid_request_errornullNoneThe request sent an Expect header other than 100-continue.
429rate_limit_errorrate_limit_errorThe seconds until the minute endsYour organisation sent too many requests this minute.
429rate_limit_errorrate_limit_errorThe seconds until the window ends, or 1Too many failed authentications came from your address, or too many requests whose keys were still being checked.
429rate_limit_errorrate_limit_errorThe seconds until a link is freeYour organisation asked for too many links for one file in 24 hours.
429rate_limit_errorrate_limit_error1Your organisation's share of the service is full, or the request waited too long for another request of your organisation.
429rate_limit_errorcapacity_exceededThe seconds until there is roomThe batch does not fit your caps together with your other jobs.
429rate_limit_errorinsufficient_quotaNoneYour organisation does not have enough credit for the batch.
431invalid_request_errornullNoneThe request headers are too large.
500server_errorserver_errorNoneThe server could not complete the request.
503server_errorservice_unavailable1The service or its database is busy or unavailable, or too many file links are being made at once.
503server_errorservice_unavailable8A file link could not be signed.
503server_errorservice_unavailable300An output of the batch has no price.
503server_erroroperation_paused300The service is paused for every organisation. It does not create batches or file links. Jobs whose work was running are stopped, and they fail with operation_paused.
503server_errorservice_unavailable3,600File links cannot be made at the moment.

Every Retry-After is from 1 to 86,400 seconds (24 hours).

Messages

These are the messages of the answers in the table above. Two groups are elsewhere: the 400 answers are in their own section, and the answers that come before a route is found are in the section after this one.

StatuscodeMessage
401authentication_errorThe API key is missing or not valid. Send it in the header 'Authorization: Bearer <key>'.
403operation_pausedThis organisation is paused. It cannot submit batches or get download links until staff unpause it.
403https_requiredThis API accepts HTTPS only. This request was sent in clear text. Treat any API key that it carried as leaked and replace it. The API revokes such a key when it reads one.
404nullNo such resource.
409idempotency_conflictThis Idempotency-Key was already used with a different request.
409result_unavailableThe job has no result: it has not completed, or it failed.
410result_expiredThe result has expired.
410result_deletedThe result was deleted.
413request_too_largeThe request body is larger than 8 MiB.
429rate_limit_errorToo many requests. Retry after the number of seconds in the Retry-After header.
429rate_limit_errorToo many failed authentications from this address. Retry after the number of seconds in the Retry-After header.
429capacity_exceededThe organisation's processing capacity is full. Retry after the number of seconds in the Retry-After header.
429insufficient_quotaThe organisation does not have enough credit for this batch.
500server_errorThe server could not complete the request.
503service_unavailableThe service is temporarily unavailable. Retry after the number of seconds in the Retry-After header.
503operation_pausedThe service is paused. Retry after the number of seconds in the Retry-After header.

A request in clear text is not redirected. The API revokes an API key that the request carried in its Authorization header or in its URL. Replace any key that you sent in clear text, and use HTTPS.

An id that is upper-case or malformed also gets 404 No such resource.

Answers before a route is found

The API sends these answers before it matches the request to a route. Their code and param are null.

StatusWhenMessage
404The path is not a route.No such path.
405The path is a route, but not for this method.This path does not accept this method. The Allow header lists the methods it accepts.
400The request has no Host header.The request has no Host header.
400The request is not valid HTTP/1.1.The request is not valid HTTP/1.1.
408The request did not arrive in time.The request did not arrive in time.
417The Expect header is not 100-continue.The only Expect value this server accepts is 100-continue.
431The request headers are too large.The request headers are too large.

A 405 answer carries an Allow header with the methods of the path, sorted and separated by a comma and a space. A CONNECT request gets 405 with an empty Allow header.

400 reasons

A 400 answer with the code invalid_request_error says in param and message which rule the request broke. The input contract lists the messages of the body fields and of the JSON rules. The outputs page lists the messages of the list parameters.

These are the other reasons:

WhenparamMessage
The Idempotency-Key header is missing or broken.Idempotency-KeyIdempotency-Key must be 1 to 255 printable ASCII characters without spaces.
The batch has too few or too many inputs.inputsMust contain between 1 and 1000 inputs.
The batch asks for trajectory without depth.trajectorytrajectory requires depth.
An input's filename breaks its rule.inputs[n].filenamefilename must be 1 to 255 characters without control characters, slashes or backslashes, and must not be '.' or '..'.
An input's sha256 breaks its rule.inputs[n].sha256sha256 must be 64 lower-case hexadecimal characters.
No camera profile has the name.inputs[n].camera.profileNo camera profile has this name.
Your organisation may not state lens values.inputs[n].camera.intrinsicsThis organisation may not state camera intrinsics. Name a camera profile instead.
The batch asks for depth, and an input has no camera values.inputs[n].cameradepth requires a camera profile or camera intrinsics on every input.
The batch asks for trajectory, and an input has no IMU data.inputs[n].imutrajectory requires IMU data on every input.
The batch asks for trajectory, and an input has no operator height.inputs[n].operator_height_mtrajectory requires operator_height_m on every input.
An input has IMU data but no camera values.inputs[n].imuIMU data requires a camera profile or camera intrinsics.
The batch has more inputs than your 24-hour cap.inputsThe batch has more inputs than the organisation may submit in 24 hours.
The batch has more inputs than your unfinished jobs cap.inputsThe batch has more inputs than the organisation may have unfinished.
The batch holds more video than your queue window.inputsThe batch holds more video than the organisation may queue.
A list's after is not an item of the list.afterafter must be the id of an item of this list.

In each param, n is the index of the input in inputs, counted from 0. The limits page explains the caps and the queue window.

A plain name has 1 to 64 letters, digits or _, and starts with a letter or _. A query parameter whose name is not plain gets the param query, so that the API never repeats a name that could hold a secret.

Some 400 answers come from the headers, the query or the body of the request:

WhenparamMessage
An API key is in the query string.queryAPI keys are accepted only in the Authorization header.
A route that is not a list has a query parameter.The parameter's name, or query when the name is not a plain nameThis path accepts no query parameters.
The Content-Type of POST /batches is not JSON.Content-TypeContent-Type must be application/json, optionally with charset=utf-8.
The body of cancel or of a result delete is not empty or {}.bodyThe request body must be empty or {}.

Job error codes

A failed job has an error object with a code, a fault, a retryable flag and a message. These are the errors a job can have:

codefaultretryablemessage
camera_data_invaliduser_errorfalseThe lens values or the IMU data do not fit the video.
cancelleduser_errortrueThe batch was cancelled before this job started.
deadline_exceededsystem_errortrueThe job did not finish within 72 hours of the acceptance of its batch.
camera_data_invaliduser_errorfalseThe host of the IMU link must resolve to public addresses only.
camera_data_invaliduser_errorfalseThe IMU link must use https on port 443, carry no username or password, and name an allowed host rather than an IP address.
camera_data_unavailableuser_errorfalseThe IMU link answered with a redirect. The link must serve the file itself.
camera_data_invaliduser_errorfalseThe IMU link breaks a rule for links.
camera_data_unavailableuser_errorfalseThe server of the IMU link sent a response that the download does not accept.
camera_data_unavailableuser_errorfalseThe server of the IMU link refused the download.
camera_data_invaliduser_errorfalseThe IMU file is larger than the size limit.
camera_data_unavailablesystem_errortrueThe IMU file could not be downloaded from its link.
video_invaliduser_errorfalseThe video does not match the SHA-256 that the input stated.
video_invaliduser_errorfalseThe video link must name a host, not an IP address.
video_invaliduser_errorfalseThe video link must use https.
video_invaliduser_errorfalseThe video link must use port 443.
video_invaliduser_errorfalseThe video link names a host that is not allowed.
video_invaliduser_errorfalseThe video link must not contain a username or a password.
operation_pausedsystem_errortrueThe job was stopped by a pause while it ran. Submit it again after the pause ends.
processing_failedsystem_errortrueThe job failed while it was processed.
video_invaliduser_errorfalseThe host of the video link must resolve to public addresses only.
video_invaliduser_errorfalseThe video could not be decoded, or it breaks a limit that the service checks while it processes the job.
video_unavailableuser_errorfalseThe video link answered with a redirect. The link must serve the file itself.
video_invaliduser_errorfalseThe video link breaks a rule for links.
video_unavailableuser_errorfalseThe server of the video link sent a response that the download does not accept.
video_unavailableuser_errorfalseThe server of the video link refused the download.
video_invaliduser_errorfalseThe video is larger than the size limit.
video_unavailablesystem_errortrueThe video could not be downloaded from its link.

A video, its lens values or its IMU data can also break a rule that the service checks while it processes the job. Such a job fails with video_invalid or camera_data_invalid. Before you send such an input again, check the video, its lens values and its IMU data against these pages.

Later versions may add job error codes. For a code that you do not know, decide by fault and retryable.

When to retry

  1. A 429 or a 503 with a Retry-After header: wait that many seconds, then send the same request again.
  2. A 429 insufficient_quota: add credit to your organisation, then send the batch again.
  3. Any other 4xx answer: do not send the same request again. Fix it first, as param and message say. There are three exceptions. After a 408, send the request again. After a 409 result_unavailable, send a result or file-link read again once the job is completed, and a result delete once the job has finished. A failed job never has a result. After a 403 operation_paused, send the request again once your organisation is unpaused, with the same Idempotency-Key for a batch.
  4. A 500, or no answer at all: send the same request again. Wait a little longer before each new attempt.
  5. For POST /batches, send the same Idempotency-Key with the same body. If the first request was accepted, you get the same batch back, not a second batch.
  6. Cancel and result deletes are safe to repeat. A repeat gets 200.

For a failed job, read its error: