Beatra

エラーとリトライ

エラーエンベロープ、retryable ルール、エラーコード一覧。

以下の表は Beatra の公開ランタイムエラー分類から自動生成されます。

Every public Beatra error response uses the standard error envelope. The error.code field is one of the stable public values below; the error.retryable boolean tells the client SDK whether a naive retry could succeed.

Branching rules for client SDKs

  • retryable: true errors can be retried with the exact same request after a brief backoff. If a Retry-After header is present, honor it.
  • retryable: false errors will produce the same outcome on retry; the client must either change the request, fix credentials, or surface the error to the user.
  • error.param (when present) is a JSON Pointer (RFC 6901) to the offending field in the request body.
  • error.type, error.details, and error.request_id provide the stable family, correction facts, and trace identifier.
  • error.message is diagnostic prose, not a branchable contract. For a task that reaches terminal failure after a provider response, it preserves the provider's wording after credential, signed-URL, control-character, and length safety handling.

When present, error.details.recovery adds a branchable action without changing the top-level error envelope. requires_input_change says whether the submitted content must change. client_request_id: new means the corrected or terminal work is a new logical request; otherwise follow retryable and the endpoint's idempotency rules.

{
  "details": {
    "recovery": {
      "action": "fix_arguments_and_resubmit",
      "requires_input_change": true,
      "client_request_id": "new"
    }
  }
}

Auth / Account

codeHTTPretryabledescription
unauthorized401noMissing or malformed authentication credentials. Send Authorization: Bearer <API key>.
invalid_api_key401noAPI key is invalid, disabled, revoked, or unknown. Create or rotate keys in the console (Settings → API Keys) and retry with the new key.
api_key_region_mismatch400noAPI key region prefix does not match this endpoint. Call the API host matching the key's region, or use a key issued for this region.
tenant_disabled403noTenant has been suspended or disabled. Contact support; retrying cannot succeed.
forbidden403noCaller does not have permission for this operation. Use a credential with the required permission; retrying unchanged cannot succeed.
email_send_failed502yesLogin-code email could not be delivered (transient send failure). Request a new code after a brief backoff.

Billing

codeHTTPretryabledescription
insufficient_balance402noInsufficient credits: this request was not started and nothing was charged. Add credits at https://console.beatra.ai/wallet?intent=buy — they take effect immediately; then retry this same request. No reinstall or re-authorization is needed.
billing_failed500yesCharge or refund attempt failed after retries. Retry with the same Idempotency-Key / client_request_id; the identity guarantees no double charge.
payment_provider_unavailable503noPayment checkout provider is not configured for this payment method. Choose another payment method in the console.

Request validation

codeHTTPretryabledescription
invalid_request422noRequest body fails structural validation. param points to the first offending field; details.errors lists every failure with its loc and reason. Fix the named fields and resend.
skill_package_format_invalid422noSkill package identity is malformed. Use a lowercase hyphenated slug of at most 64 characters and a valid SemVer package version.
unsupported_capability400noCapability does not exist or is disabled. GET /v1/catalog/capabilities lists the currently available capabilities.
unsupported_model400noModel does not exist or is not selectable for this capability. Discover selectable models with beatra.models.list or GET /v1/catalog/models, or use model=auto.
unsupported_option422noThe selected concrete model does not support a requested value or control. param identifies the field and details.candidate_failures[] carries a specific failure code such as unsupported_resolution, unsupported_duration, or unsupported_aspect_ratio, plus the received and supported values. Change the named field or choose a different model; with model=auto this is returned only when no candidate can satisfy the request.
no_eligible_model422noNo live model can honor the complete model=auto request. details.candidate_failures[] lists each provider-neutral rejection; change only the incompatible fields or pick a listed concrete model.
voice_model_incompatible422noThe requested voice does not resolve on the requested model. Use model=auto, a compatible model, or another voice from the voices list.
unsupported_input_modality422noThe selected model does not support an input modality in the request (such as image, audio, or file input). param points to the first offending field; remove it or choose a model that supports it.
context_length_exceeded422noThe request exceeds the selected model's context window. Shorten the input or choose a model with a larger context window.
safety_rejected400noThe request did not pass content safety review. Ask the user to review the prompt and every input resource, then edit or replace content that may be unsafe before submitting a new task with a new client_request_id. Retrying the same content will not help.
content_filtered502noA safety filter blocked the output mid-generation. Rephrase the prompt or switch models; an identical retry is usually blocked again.
not_found404noRequested HTTP resource or endpoint was not found. Check the path and identifier; retrying unchanged cannot succeed.
streaming_not_yet_implemented501noLegacy compatibility code for older deployments where stream=true was recognized but not enabled.
invalid_window422noTime range is invalid.
invalid_cursor400noPagination cursor is malformed.

Callbacks

codeHTTPretryabledescription
callback_url_required422noA callback URL is required when a callback signing key is selected. Add callback_url or remove callback_signing_key_id.
callback_signing_key_not_found404noCallback signing key does not exist or is not visible to this account. List signing keys in the console and pass a current key id.
callback_signing_key_inactive422noCallback signing key is retired and cannot be selected for a new task. Select an active key, or omit the key id for unsigned delivery.

Media inputs

codeHTTPretryabledescription
invalid_media422noMedia input is malformed or cannot be decoded. Re-export or re-encode the file and submit it again; param names the offending field.
unsupported_media_type422noMedia input type is not supported for this capability. Convert to a supported format (see the capability page or model constraints) and resend.
media_too_large413noMedia input exceeds the allowed size. Compress or trim the input, or upload it first and pass an artifact reference.
media_fetch_failed422yesBeatra could not access an input resource. Check that the resource is reachable over HTTPS, or upload it and pass an artifact reference.

Tasks and resources

codeHTTPretryabledescription
task_not_found404notask_id does not exist or does not belong to this account. Use the task_id returned at creation; list recent tasks with GET /v1/tasks or beatra.tasks.list.
conflict409noThe operation conflicts with the resource's current state — for task cancellation this means execution continues. Follow details.action (usually: keep polling the same task); do not resubmit the work.
result_undeliverable502noThe completed result could not be delivered because it is too large, too deeply nested, or not valid JSON. Do not resubmit the same lookup.
artifact_not_found404noartifact_id does not exist or does not belong to this account. Upload the media again and use the newly returned artifact id.
voice_not_found404novoice_id does not exist or does not belong to this account. List available voices with GET /v1/voices or beatra.voices.list.

Idempotency and response mode

codeHTTPretryabledescription
idempotency_conflict409noSame Idempotency-Key / client_request_id was used with a different request body. Submit changed work with a NEW identity; to retry identical work unchanged, reuse the original. Inspect the existing task before choosing.
request_in_progress409yesSame idempotency identity matches an in-flight request. Retry later with the same identity; the original response will be returned.

Capacity and availability

codeHTTPretryabledescription
rate_limited429yesCaller-side rate limit exceeded. Retry after the Retry-After interval; X-RateLimit-* headers report the active budget.
model_unavailable503yesThe requested model is not currently available. Retry with backoff, switch to another selectable model (beatra.models.list or GET /v1/catalog/models), or use model=auto.
model_request_failed502yesThe model request failed after retryable service errors. Retry with backoff; if it persists, adjust inputs or choose another model.
model_timeout504yesThe model request timed out. Retry with backoff.
model_rate_limited429yesModel capacity was rate-limited. Retry after a backoff.
model_output_invalid502yesThe model completed successfully, but the generated artifact could not be downloaded after 3 attempts. The task is failed and no result artifact is available.
internal_error500yesUnclassified server-side error. Retry with the same idempotency identity; if it persists, report the request_id.

Asynchronous task failures

A generation can be admitted successfully and later end with status: failed. REST task reads, MCP beatra.tasks.get, and callbacks return the same Task.error object with code, type, message, retryable, optional param, optional details, and request_id. A failed task read is the task's final state, not an MCP protocol error.

model_output_invalid means the model completed successfully but Beatra could not download the generated artifact after 3 attempts. No result artifact is available for that failed task.

MCP tool errors

A failed MCP tool call returns a tool result with isError: true and structuredContent.error carrying the same vocabulary as the REST envelope — code, type, message, retryable, optional param (JSON Pointer into the tool arguments), optional details — plus the JSON-RPC jsonrpc_code. Branch on code and retryable exactly as with REST.

One MCP-only code exists: insufficient_scope (the OAuth grant lacks a required scope; missing_scopes names them — re-run the Beatra device authorization; retrying without re-authorizing cannot succeed). Unexpected server failures surface as internal_error tool results, never as bare HTTP errors.


Generated from 45 public runtime error codes. 24 internal, admin, or provider-ingress codes are intentionally omitted from public docs.

エラーの扱い方

すべてのエラー本体:

{
  "error": {
    "code": "<machine code>",
    "type": "<error family>",
    "message": "<human description>",
    "retryable": true,
    "param": "/field",
    "details": {},
    "request_id": "req_..."
  }
}
  • retryable: true -> 短いバックオフ後に同じ Idempotency-Key同じリクエスト を再試行可能。Retry-After ヘッダがある場合は 従ってください。429 応答には X-RateLimit-* ヘッダが付きます。
  • retryable: false -> 再試行前にリクエストを変えてください。 リトライ不可エラーでループするのはバグです。

On this page