journeyapi.devDocs
Getting started

Errors

Conventional HTTP status codes with a machine-readable code on every failure.

Errors return a JSON body with a stable code. Match on code, never on message: messages are written for humans and change.

Error response
{
  "error": {
    "code": "insufficient_balance",
    "message": "This request costs $0.05 and the balance is $0.02.",
    "doc_url": "https://docs.journeyapi.dev/errors#insufficient_balance"
  }
}

Status codes

StatusCodeMeaning
400invalid_requestA parameter is missing or malformed.
401invalid_api_keyThe key is unknown, revoked or malformed.
402insufficient_balanceThe balance will not cover the request.
403insufficient_scopeThe key lacks the scope this endpoint needs.
404not_foundNo job or image with that id on this account.
409job_not_terminalThe action needs a finished job and this one is still running.
422prompt_rejectedThe prompt did not pass content screening.
429rate_limitedToo many requests. Honour the Retry-After header.
500internal_errorOur fault. Safe to retry with the same idempotency key.
503capacity_unavailableNo capacity right now. Retry with backoff.

Failed jobs

A request can be accepted and the job still fail. That surfaces on the job, not as an HTTP error.

Job error codeMeaning
content_policyThe rendered output was rejected by content screening.
render_timeoutThe render exceeded its ceiling. Refunded automatically.
source_unreadableA supplied image URL could not be fetched or decoded.
internal_errorUnexpected failure. Refunded automatically.