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"
}
}
messagesays what went wrong, in one or two sentences.typeis one of four values, set by the status.paramnames the part of the request that broke a rule, such as a field's JSON path, a header or a query parameter. It is null when no single part is at fault.codenames the error. It is null for some answers, as the table below shows.
All four keys are always present.
| type | Statuses |
|---|---|
authentication_error | 401 |
rate_limit_error | 429 |
server_error | 500 and above |
invalid_request_error | Every 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.
| Status | type | code | Retry-After | When |
|---|---|---|---|---|
| 400 | invalid_request_error | invalid_request_error | None | The request breaks a rule. param and message say which. |
| 400 | invalid_request_error | null | None | The request has no Host header, or it is not valid HTTP/1.1. |
| 401 | authentication_error | authentication_error | None | The API key is missing, malformed, unknown or revoked. |
| 403 | invalid_request_error | https_required | None | The request was sent in clear text. |
| 403 | invalid_request_error | operation_paused | None | Your 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. |
| 404 | invalid_request_error | null | None | The id names nothing of your organisation, or the path is not a route. |
| 405 | invalid_request_error | null | None | The path does not accept the method. |
| 408 | invalid_request_error | null | None | The request did not arrive in time. |
| 409 | invalid_request_error | idempotency_conflict | None | The Idempotency-Key was already used with another body. |
| 409 | invalid_request_error | result_unavailable | None | The job has not completed, or it failed. |
| 410 | invalid_request_error | result_expired | None | The result has expired. |
| 410 | invalid_request_error | result_deleted | None | The result was deleted. |
| 413 | invalid_request_error | request_too_large | None | The body of POST /batches is larger than 8 MiB. |
| 417 | invalid_request_error | null | None | The request sent an Expect header other than 100-continue. |
| 429 | rate_limit_error | rate_limit_error | The seconds until the minute ends | Your organisation sent too many requests this minute. |
| 429 | rate_limit_error | rate_limit_error | The seconds until the window ends, or 1 | Too many failed authentications came from your address, or too many requests whose keys were still being checked. |
| 429 | rate_limit_error | rate_limit_error | The seconds until a link is free | Your organisation asked for too many links for one file in 24 hours. |
| 429 | rate_limit_error | rate_limit_error | 1 | Your organisation's share of the service is full, or the request waited too long for another request of your organisation. |
| 429 | rate_limit_error | capacity_exceeded | The seconds until there is room | The batch does not fit your caps together with your other jobs. |
| 429 | rate_limit_error | insufficient_quota | None | Your organisation does not have enough credit for the batch. |
| 431 | invalid_request_error | null | None | The request headers are too large. |
| 500 | server_error | server_error | None | The server could not complete the request. |
| 503 | server_error | service_unavailable | 1 | The service or its database is busy or unavailable, or too many file links are being made at once. |
| 503 | server_error | service_unavailable | 8 | A file link could not be signed. |
| 503 | server_error | service_unavailable | 300 | An output of the batch has no price. |
| 503 | server_error | operation_paused | 300 | The 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. |
| 503 | server_error | service_unavailable | 3,600 | File 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.
| Status | code | Message |
|---|---|---|
| 401 | authentication_error | The API key is missing or not valid. Send it in the header 'Authorization: Bearer <key>'. |
| 403 | operation_paused | This organisation is paused. It cannot submit batches or get download links until staff unpause it. |
| 403 | https_required | This 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. |
| 404 | null | No such resource. |
| 409 | idempotency_conflict | This Idempotency-Key was already used with a different request. |
| 409 | result_unavailable | The job has no result: it has not completed, or it failed. |
| 410 | result_expired | The result has expired. |
| 410 | result_deleted | The result was deleted. |
| 413 | request_too_large | The request body is larger than 8 MiB. |
| 429 | rate_limit_error | Too many requests. Retry after the number of seconds in the Retry-After header. |
| 429 | rate_limit_error | Too many failed authentications from this address. Retry after the number of seconds in the Retry-After header. |
| 429 | capacity_exceeded | The organisation's processing capacity is full. Retry after the number of seconds in the Retry-After header. |
| 429 | insufficient_quota | The organisation does not have enough credit for this batch. |
| 500 | server_error | The server could not complete the request. |
| 503 | service_unavailable | The service is temporarily unavailable. Retry after the number of seconds in the Retry-After header. |
| 503 | operation_paused | The 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.
| Status | When | Message |
|---|---|---|
| 404 | The path is not a route. | No such path. |
| 405 | The path is a route, but not for this method. | This path does not accept this method. The Allow header lists the methods it accepts. |
| 400 | The request has no Host header. | The request has no Host header. |
| 400 | The request is not valid HTTP/1.1. | The request is not valid HTTP/1.1. |
| 408 | The request did not arrive in time. | The request did not arrive in time. |
| 417 | The Expect header is not 100-continue. | The only Expect value this server accepts is 100-continue. |
| 431 | The 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:
| When | param | Message |
|---|---|---|
The Idempotency-Key header is missing or broken. | Idempotency-Key | Idempotency-Key must be 1 to 255 printable ASCII characters without spaces. |
| The batch has too few or too many inputs. | inputs | Must contain between 1 and 1000 inputs. |
| The batch asks for trajectory without depth. | trajectory | trajectory requires depth. |
| An input's filename breaks its rule. | inputs[n].filename | filename 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].sha256 | sha256 must be 64 lower-case hexadecimal characters. |
| No camera profile has the name. | inputs[n].camera.profile | No camera profile has this name. |
| Your organisation may not state lens values. | inputs[n].camera.intrinsics | This 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].camera | depth requires a camera profile or camera intrinsics on every input. |
| The batch asks for trajectory, and an input has no IMU data. | inputs[n].imu | trajectory requires IMU data on every input. |
| The batch asks for trajectory, and an input has no operator height. | inputs[n].operator_height_m | trajectory requires operator_height_m on every input. |
| An input has IMU data but no camera values. | inputs[n].imu | IMU data requires a camera profile or camera intrinsics. |
| The batch has more inputs than your 24-hour cap. | inputs | The batch has more inputs than the organisation may submit in 24 hours. |
| The batch has more inputs than your unfinished jobs cap. | inputs | The batch has more inputs than the organisation may have unfinished. |
| The batch holds more video than your queue window. | inputs | The batch holds more video than the organisation may queue. |
A list's after is not an item of the list. | after | after 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:
| When | param | Message |
|---|---|---|
| An API key is in the query string. | query | API 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 name | This path accepts no query parameters. |
The Content-Type of POST /batches is not JSON. | Content-Type | Content-Type must be application/json, optionally with charset=utf-8. |
The body of cancel or of a result delete is not empty or {}. | body | The 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:
| code | fault | retryable | message |
|---|---|---|---|
camera_data_invalid | user_error | false | The lens values or the IMU data do not fit the video. |
cancelled | user_error | true | The batch was cancelled before this job started. |
deadline_exceeded | system_error | true | The job did not finish within 72 hours of the acceptance of its batch. |
camera_data_invalid | user_error | false | The host of the IMU link must resolve to public addresses only. |
camera_data_invalid | user_error | false | The 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_unavailable | user_error | false | The IMU link answered with a redirect. The link must serve the file itself. |
camera_data_invalid | user_error | false | The IMU link breaks a rule for links. |
camera_data_unavailable | user_error | false | The server of the IMU link sent a response that the download does not accept. |
camera_data_unavailable | user_error | false | The server of the IMU link refused the download. |
camera_data_invalid | user_error | false | The IMU file is larger than the size limit. |
camera_data_unavailable | system_error | true | The IMU file could not be downloaded from its link. |
video_invalid | user_error | false | The video does not match the SHA-256 that the input stated. |
video_invalid | user_error | false | The video link must name a host, not an IP address. |
video_invalid | user_error | false | The video link must use https. |
video_invalid | user_error | false | The video link must use port 443. |
video_invalid | user_error | false | The video link names a host that is not allowed. |
video_invalid | user_error | false | The video link must not contain a username or a password. |
operation_paused | system_error | true | The job was stopped by a pause while it ran. Submit it again after the pause ends. |
processing_failed | system_error | true | The job failed while it was processed. |
video_invalid | user_error | false | The host of the video link must resolve to public addresses only. |
video_invalid | user_error | false | The video could not be decoded, or it breaks a limit that the service checks while it processes the job. |
video_unavailable | user_error | false | The video link answered with a redirect. The link must serve the file itself. |
video_invalid | user_error | false | The video link breaks a rule for links. |
video_unavailable | user_error | false | The server of the video link sent a response that the download does not accept. |
video_unavailable | user_error | false | The server of the video link refused the download. |
video_invalid | user_error | false | The video is larger than the size limit. |
video_unavailable | system_error | true | The 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
- A 429 or a 503 with a
Retry-Afterheader: wait that many seconds, then send the same request again. - A 429
insufficient_quota: add credit to your organisation, then send the batch again. - Any other 4xx answer: do not send the same request again. Fix it first, as
paramandmessagesay. There are three exceptions. After a 408, send the request again. After a 409result_unavailable, send a result or file-link read again once the job iscompleted, and a result delete once the job has finished. A failed job never has a result. After a 403operation_paused, send the request again once your organisation is unpaused, with the sameIdempotency-Keyfor a batch. - A 500, or no answer at all: send the same request again. Wait a little longer before each new attempt.
- For
POST /batches, send the sameIdempotency-Keywith the same body. If the first request was accepted, you get the same batch back, not a second batch. - Cancel and result deletes are safe to repeat. A repeat gets 200.
For a failed job, read its error:
- With
retryabletrue, the same input may succeed in a new batch. Send it with a newIdempotency-Key. - With
retryablefalse, the input itself must change first. Themessagesays what to fix.