Skip to Content
ScenebrewDevelopers

Errors

Every error is an RFC 9457 problem document with a stable machine-readable code; a failed operation is data, not an error.

The API has one error envelope. Whatever failed — validation, authentication, a pipeline precondition, the platform — the response is Content-Type: application/problem+json with the members of RFC 9457 plus two extensions:

{
  "type": "https://scenebrew.com/problems/missing-sdd",
  "title": "Conflict",
  "status": 409,
  "detail": "generate_scene_peg needs the scene's SDD; run generate_scene_sdd first",
  "instance": "/v1/scenes/0192a7c4-3f5e-7c8a-9b1d-2e3f4a5b6c7d/steps",
  "code": "missing_sdd"
}
MemberMeaning
typeA stable identifier derived from code (https://scenebrew.com/problems/<code>, kebab-case). about:blank when the status code is the whole story. Not a link — it is not dereferenced.
titleThe HTTP status phrase.
statusThe HTTP status code, repeated.
detailHuman-readable explanation of this occurrence. Wording may change; branch on code, not on detail.
instanceThe request path.
codeMachine-readable error code, lower snake case. Absent when the status is self-explanatory.
errorsOn 422 only: the field-level failures, each with loc, msg, type.

Successful responses never use this envelope; a 2xx body is the resource.

Status codes and codes

StatuscodeWhen
400missing_briefgenerate_scene_sdd was requested without a brief.
400missing_instructionsrevise_scene_sdd or revise_scene_peg was requested without instructions.
400seed_not_applicableA seed on a step other than generate_scene_blueprint.
400invalid_cursorA cursor that cannot be read, or one from another collection. See Pagination.
400invalid_preferA Prefer header the API does not understand (wait above 60, an unknown token).
400no_files, kind_mismatchPOST /v1/files without a part; a file whose content does not match the artifact or asset it is for.
401—No key, unknown key, or revoked key. WWW-Authenticate: Bearer.
402quota_exceeded_projectsYour plan has no room for another project.
403insufficient_scopeThe key lacks the scope; the header names it. See Authentication.
404—No such resource in your workspace — also the answer for another workspace's ids.
404theme_not_found, design_not_found, asset_not_found, file_not_foundAn id in the request body that is not the project's (a file: not your team's); detail names it.
409missing_sddgenerate_scene_peg or revise_scene_sdd before the scene has a design.
409missing_peggenerate_scene_blueprint or revise_scene_peg before the scene has a graph.
409missing_blueprintgenerate_scene_model before the scene has a blueprint.
409theme_draftA scene created with, switched to or laid out on a draft theme; publish_theme it first.
409step_in_progressA step was requested while another step runs on the scene.
409turn_in_progressA message was posted while the session's previous turn is still running.
409not_cancelableCancel on an asset generation that has already started.
409request_id_reusedA generation's request_id sent again with other arguments.
409—A scene name already used in the project.
413payload_too_largeA file upload over 100 MB.
415—An upload whose media type is not GLB, PNG, JPEG or WebP.
422—The request did not match the schema; errors lists the fields.
422system_tags_read_onlyA create that sets system_tags, or an update that changes them. See Library.
429—Reserved for rate limits; not issued today.
500—Unexpected failure. Retry once; report it if it persists.
501not_implementedReserved for an operation declared on the contract before it is available; not issued today.
502—The platform behind the API is temporarily unavailable. Retry with backoff.

A 422 looks like this:

{
  "type": "about:blank",
  "title": "Unprocessable Content",
  "status": 422,
  "detail": "Request validation failed",
  "instance": "/v1/scenes/0192a7c4-3f5e-7c8a-9b1d-2e3f4a5b6c7d/steps",
  "errors": [
    {
      "type": "enum",
      "loc": ["body", "step"],
      "msg": "Input should be 'generate_scene_sdd', 'revise_scene_sdd', 'generate_scene_peg', …",
      "input": "make_sdd"
    }
  ]
}

Failures inside an operation

Work that was accepted (202) but did not finish is not an HTTP error: the operation ends with status: "failed" and an error object — code, message and retryable:

error.codeMeaning
insufficient_creditsThe workspace has no credits for this step. Nothing was charged.
sdd_issuesThe brief could not be turned into a consistent design. Rephrase and run generate_scene_sdd again.
agent_unavailableThe AI service could not be reached. Retry later.
step_failedThe step ran and failed; message carries the detail.
layout_failed, brew_failedThe procedural step failed on its input; message carries the detail.
runner_unavailableThe procedural runner could not be reached. Retry later.
canceledYou canceled it (status is canceled).
generation_failed, generation_refused, generation_lostAn asset generation failed, was refused by the generator, or was lost to a restart.
no_provider_keyA theme without concept art needs your team's Scenario key for its concept image. Nothing was made. An AI scene step: your team has no key for its writer model's provider.
no_role_mapping, unknown_provider, unknown_model, model_lacks_capabilityAn AI scene step found no model to run on: your team maps none to its writer role and Scenebrew's own is not available, or the mapping names a provider or model it cannot use. Set it in team settings, AI models.
writer_unavailableThe platform cannot run the writer model at the moment.
provider_key_rejected, model_not_found, provider_bad_request, request_unsupported, unsupported_protocolThe writer model's provider refused the request.
provider_rate_limited, provider_unavailable, provider_unreachable, provider_bad_responseThe writer model's provider was busy, down, unreachable or answered badly; retryable is true.
invalid_output, output_truncatedThe writer model's answer did not validate, or was cut off.
invalid_pegrevise_scene_peg on a current graph that does not validate; upload a valid one or build it again.
generated_content_invalid, fill_invalid, plan_invalidA theme, design or recipe could not be generated validly. Nothing was published; retry or rephrase.

Credits are charged only when a step succeeds; a canceled turn pays for the model calls it had made.

Retrying

  • 502, agent_unavailable, runner_unavailable, the provider codes with retryable: true and network errors: retry with exponential backoff.
  • Steps, session creates, messages and asset generations: send an Idempotency-Key so a retry after a lost response returns the operation already created instead of a second one. Theme, design and recipe generations carry a request_id in the body for the same purpose; see Generation.
  • The procedural steps are idempotent with respect to their inputs: rerunning them writes a new artifact version from the same graph or blueprint.

On this page