API Responses

View Markdown

Overview

The Ittybit API returns JSON-encoded responses.

  • Single resource endpoints (e.g. GET /tasks/:id) return the resource object directly
  • List endpoints (e.g. GET /tasks) return an array of objects
  • Error responses return an object with kind and message fields

Success Responses

Success responses return data directly — no wrapper object.

Single resource

// GET /tasks/task_abcdefgh12345678
{
  "id": "task_abcdefgh12345678",
  "object": "task",
  "kind": "video",
  "status": "succeeded",
  "inputs": [...],
  "outputs": [...],
  "created_at": 1735689825,
  "updated_at": 1735689886
}

List response

// GET /tasks
[
  {
    "id": "task_abcdefgh12345678",
    "object": "task",
    "kind": "video",
    "status": "succeeded"
  },
  {
    "id": "task_abcdefgh90123456",
    "object": "task",
    "kind": "speech",
    "status": "processing"
  }
]

List responses with no results return an empty array ([]), not null or an error.


Error Responses

Error responses include a kind identifier and a human-readable message:

// 404 Not Found
{
  "kind": "task_not_found",
  "message": "The task does not exist. Verify the task ID."
}
// 400 Bad Request
{
  "kind": "request_invalid",
  "message": "The 'kind' field is required."
}
// 401 Unauthorized
{
  "kind": "token_missing",
  "message": "No authorization token was provided."
}

Status Codes

Status CodeDescriptionWhen You'll See It
200 OKRequest succeededMost common success response
201 CreatedResource createdReturned when a new resource is created via POST
202 AcceptedRequest acceptedRequest accepted for processing but not yet complete
400 Bad RequestInvalid requestMissing required parameters or invalid values
401 UnauthorizedAuthentication failedNo API key or invalid key provided
402 Payment RequiredPayment issueA payment issue exists on the account
403 ForbiddenPermission deniedAPI key doesn't have access to the requested resource
404 Not FoundResource not foundThe resource doesn't exist
405 Method Not AllowedInvalid HTTP methodHTTP method not supported for this endpoint
429 Too Many RequestsRate limit exceededToo many requests in a short period
500 Internal Server ErrorServer errorSomething went wrong on our side
503 Service UnavailableService offlineTemporarily unavailable

Response headers

List endpoints include pagination headers:

HeaderDescription
LinkNavigation URLs following RFC 5988
Has-Moretrue if there are more results
LimitThe limit that was applied

See Pagination for details.


Rate Limits

If you exceed rate limits, you will receive a 429 Too Many Requests response with a Retry-After header.

If you need higher limits, please contact support.


Report issues

Please contact support if you are receiving unexpected errors, particularly 5xx errors.

On this page