本文へ移動
Developers

Reference

Errors

HTTP statusで大分類し、typeとcodeで原因を特定し、request_idで一つのリクエストを追跡します。

Error properties

PropertyMeaning
typeauthentication_errorなどの大分類
codeinvalid_source_urlなどの具体的原因
message利用者向けの説明
request_id問い合わせとログ照合に使うID
param問題のある入力項目

Example error

400 response
{  "error": {    "type": "validation_error",    "code": "invalid_source_url",    "message": "The source URL could not be fetched.",    "request_id": "req_preview_01",    "param": "input.url"  }}

Retryability

StatusExampleRetry?
400入力が不正No — 入力を修正
401認証失敗No — 鍵を確認
404リソースなしNo
409現在状態と競合条件を再取得
429一時的な上限超過Yes — backoff
503一時的な停止Yes — backoff + jitter

Backoff

Preview retry
const delayMs = Math.min(1000 * 2 ** attempt, 30000);const jitterMs = Math.random() * delayMs * 0.5;await sleep(delayMs + jitterMs);