---
title: アップロード URL を発行
description: 最大 2 GiB のファイルを送るための URL を発行します。有効期間は 15 分です。upload_headers を付けて
  upload_url に PUT し、完了後に public_url を生成入力へ渡します。
canonical_url: https://orchestor.io/docs/creative/rest-api/endpoint-reference/creative-files/post-create-creative-upload-url
markdown_url: https://orchestor.io/docs/creative/rest-api/endpoint-reference/creative-files/post-create-creative-upload-url.md
---

# アップロード URL を発行

最大 2 GiB のファイルを送るための URL を発行します。有効期間は 15 分です。upload_headers を付けて upload_url に PUT し、完了後に public_url を生成入力へ渡します。

```http
POST /v1/creative/files/generate-upload-url
```

Server: https://api.orchestor.io

Operation ID: `createCreativeUploadUrl`

## Authentication

```json
[
  [
    {
      "key": "bearerAuth",
      "type": "http",
      "description": "外部 API キー。session は受け付けません。apiKey と同時に送ると 401 です。",
      "scheme": "bearer",
      "scopes": []
    }
  ],
  [
    {
      "key": "apiKey",
      "type": "apiKey",
      "description": "外部 API キー。bearerAuth と同時に送ると 401 です。",
      "name": "x-api-key",
      "in": "header",
      "scopes": []
    }
  ]
]
```

## Parameters

No parameters.

## Request body

```json
{
  "description": "以下の入力を JSON で送信します。モデル固有の項目はカタログの対応条件も確認してください。",
  "required": true,
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "type": "object",
        "required": [
          "content_type",
          "size_bytes"
        ],
        "properties": {
          "content_type": {
            "type": "string",
            "description": "ファイルの MIME タイプ。例は image/png、video/mp4。"
          },
          "size_bytes": {
            "minimum": 1,
            "maximum": 2147483648,
            "type": "integer",
            "description": "ファイルの正確なサイズ。単位はバイト。"
          },
          "filename": {
            "minLength": 1,
            "maxLength": 255,
            "type": "string",
            "description": "元ファイルの名前。1〜255 文字。"
          }
        },
        "additionalProperties": true
      },
      "example": {
        "content_type": "image/png",
        "size_bytes": 482113
      }
    }
  ]
}
```

## Responses

### 201

```json
{
  "statusCode": "201",
  "description": "アップロードの送信先と入力用 URL。upload_headers を変更せず upload_url に PUT した後に public_url を使います。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "この操作が返す結果。形状は以下の子フィールドを参照してください。",
            "required": [
              "public_url",
              "upload_url",
              "upload_method",
              "upload_headers",
              "content_type",
              "expires_at",
              "asset_id"
            ],
            "properties": {
              "public_url": {
                "type": "string",
                "description": "アップロード完了後に入力へ渡すファイルの HTTPS URL。"
              },
              "upload_url": {
                "type": "string",
                "description": "ファイルのバイト列を送信する署名付き URL。秘密値として扱い、API キーを送らないでください。"
              },
              "upload_method": {
                "type": "string",
                "description": "署名付き URL への送信に使う HTTP メソッド。PUT を使用します。",
                "enumValues": [
                  "PUT"
                ]
              },
              "upload_headers": {
                "type": "object",
                "description": "ファイル送信時にそのまま付けるヘッダー。MIME タイプとサイズを変更しないでください。",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "content_type": {
                "type": "string",
                "description": "ファイルの MIME タイプ。例は image/png、video/mp4。"
              },
              "expires_at": {
                "type": "string",
                "description": "署名付きアップロード URL が失効する日時。発行から 15 分以内に送信してください。"
              },
              "asset_id": {
                "type": "string",
                "description": "アップロードしたファイルを識別する ID。"
              }
            },
            "additionalProperties": true
          }
        }
      },
      "example": {
        "data": {
          "public_url": "https://media.orchestor.io/assets/asset_6f1d0c2b9a8e4f7d/source.png",
          "upload_url": "https://storage.example.com/upload/example?signature=EXAMPLE_ONLY",
          "upload_method": "PUT",
          "upload_headers": {
            "content-type": "image/png",
            "content-length": "482113"
          },
          "content_type": "image/png",
          "expires_at": "2026-11-06T00:15:00Z",
          "asset_id": "asset_6f1d0c2b9a8e4f7d"
        }
      }
    }
  ]
}
```

### 400

```json
{
  "statusCode": "400",
  "description": "入力が不正です。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "invalid_request",
          "message": "入力が不正です。必須項目、型、範囲を確認して修正してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "validation",
          "stage": "validation",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "invalid_request",
          "next_action": "fix_input"
        }
      }
    }
  ]
}
```

### 401

```json
{
  "statusCode": "401",
  "description": "認証が必要です。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "unauthorized",
          "message": "認証が必要です。有効な API キーと認証ヘッダーを確認してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "authentication",
          "stage": "authentication",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "unauthorized",
          "next_action": "authenticate"
        }
      }
    }
  ]
}
```

### 403

```json
{
  "statusCode": "403",
  "description": "API キーの権限または利用上限により要求が拒否されました。従量課金の USD 残高が生成料金に足りない場合は not_enough_credits を返し、ジョブと予約を作りません。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "insufficient_scope",
          "message": "API キーの権限が不足しています。必要な権限を持つ API キーを指定してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "authorization",
          "stage": "authorization",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "insufficient_scope",
          "next_action": "authenticate"
        }
      }
    }
  ]
}
```

### 404

```json
{
  "statusCode": "404",
  "description": "対象が見つかりません。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "not_found",
          "message": "対象が見つかりません。ルート、モデル、ジョブとワークスペースの所属を確認してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "validation",
          "stage": "validation",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "not_found",
          "next_action": "fix_input"
        }
      }
    }
  ]
}
```

### 413

```json
{
  "statusCode": "413",
  "description": "リクエスト本体またはアップロードがサイズ上限を超えました。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "payload_too_large",
          "message": "リクエスト本体がサイズ上限を超えました。本体を小さくし、ファイルのバイト列は upload_url へ送信してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "validation",
          "stage": "validation",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "payload_too_large",
          "next_action": "fix_input"
        }
      }
    }
  ]
}
```

### 415

```json
{
  "statusCode": "415",
  "description": "Content-Type に application/json を指定してください。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "unsupported_media_type",
          "message": "未対応の Content-Type です。application/json を指定してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "validation",
          "stage": "validation",
          "retryable": false,
          "retry_after_seconds": null,
          "public_reason": "unsupported_media_type",
          "next_action": "fix_input"
        }
      }
    }
  ]
}
```

### 429

```json
{
  "statusCode": "429",
  "description": "リクエスト数または生成キューの上限を超えました。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "queue_full",
          "message": "受付枠が埋まっています。retry-after 後に同じ入力と冪等性キーで再試行してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "capacity",
          "stage": "admission",
          "retryable": true,
          "retry_after_seconds": 30,
          "public_reason": "queue_full",
          "next_action": "retry_later"
        }
      }
    }
  ]
}
```

### 500

```json
{
  "statusCode": "500",
  "description": "処理中に内部エラーが発生しました。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "internal_error",
          "message": "処理中に内部エラーが発生しました。待機後にバックオフして再試行してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "internal",
          "stage": "processing",
          "retryable": true,
          "retry_after_seconds": 30,
          "public_reason": "internal_error",
          "next_action": "retry_later"
        }
      }
    }
  ]
}
```

### 502

```json
{
  "statusCode": "502",
  "description": "モデル提供元への送信に失敗しました。retryable を確認してください。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "provider_submission_failed",
          "message": "モデル提供元への送信に失敗しました。retry-after 後に同じ入力と冪等性キーで再試行してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "provider",
          "stage": "submission",
          "retryable": true,
          "retry_after_seconds": 30,
          "public_reason": "provider_submission_failed",
          "next_action": "retry_later"
        }
      }
    }
  ]
}
```

### 503

```json
{
  "statusCode": "503",
  "description": "サービスまたはモデルが一時的に利用できません。retry-after を確認してください。",
  "headers": [
    {
      "name": "x-orchestor-request-id",
      "in": "header",
      "required": false,
      "description": "HTTP リクエストの相関 ID。ジョブの request_id とは別の値。",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "ratelimit-limit",
      "in": "header",
      "required": false,
      "description": "現在の期間で許可されるリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-remaining",
      "in": "header",
      "required": false,
      "description": "現在の期間で残っているリクエスト数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "ratelimit-reset",
      "in": "header",
      "required": false,
      "description": "制限がリセットされるまでの秒数。",
      "schema": {
        "type": "integer"
      }
    },
    {
      "name": "retry-after",
      "in": "header",
      "required": false,
      "description": "再試行までの待機秒数。",
      "schema": {
        "type": "integer"
      }
    }
  ],
  "content": [
    {
      "contentType": "application/json",
      "schema": {
        "name": "ErrorEnvelope",
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "description": "失敗理由と再試行に必要な情報。失敗していなければ null。",
            "required": [
              "code",
              "message",
              "request_id",
              "category",
              "stage",
              "retryable",
              "retry_after_seconds",
              "public_reason",
              "next_action"
            ],
            "properties": {
              "code": {
                "name": "CreativeErrorCode",
                "type": "string",
                "description": "失敗原因を識別する機械処理向けコード。message の文字列で分岐しないでください。",
                "enumValues": [
                  "bad_request",
                  "invalid_request",
                  "unknown_parameter",
                  "unauthorized",
                  "session_not_accepted",
                  "insufficient_funds",
                  "not_enough_credits",
                  "api_key_spend_limit_exceeded",
                  "insufficient_scope",
                  "open_key_route_not_allowed",
                  "open_key_required",
                  "not_found",
                  "idempotency_conflict",
                  "draft_expired",
                  "job_not_completed",
                  "job_failed",
                  "job_canceled",
                  "job_generation_already_started",
                  "job_not_cancelable",
                  "webhook_not_configured",
                  "job_not_terminal",
                  "asset_upload_incomplete",
                  "top_up_in_dashboard",
                  "payload_too_large",
                  "asset_too_large",
                  "unsupported_media_type",
                  "queue_full",
                  "rate_limited",
                  "provider_rate_limited",
                  "internal_error",
                  "billing_in_dashboard",
                  "provider_submission_failed",
                  "provider_capacity_exceeded",
                  "provider_not_configured",
                  "database_busy",
                  "deploy_draining",
                  "overloaded",
                  "replica_not_ready",
                  "api_key_auth_unavailable",
                  "asset_storage_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "利用者に表示できる処理結果または失敗理由の説明。"
              },
              "request_id": {
                "pattern": "^req_[a-f0-9]{32}$",
                "type": "string",
                "description": "この生成または HTTP 要求を追跡する ID。HTTP の相関 ID とジョブ ID は別に記録します。"
              },
              "category": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力、認証、課金、生成など、失敗原因の分類。"
              },
              "stage": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "入力検証、受付、生成、決済など、失敗が発生した段階。"
              },
              "retryable": {
                "type": "boolean",
                "description": "入力を変えずに後から再試行できるかどうか。"
              },
              "retry_after_seconds": {
                "type": "integer",
                "nullable": true,
                "description": "同じ要求を再試行するまで待つ秒数。再試行不要なら null。"
              },
              "public_reason": {
                "pattern": "^[a-z0-9_]+$",
                "type": "string",
                "description": "利用者に公開できる失敗理由の識別子。"
              },
              "next_action": {
                "type": "string",
                "description": "次に必要な操作。値に従って入力修正、待機、状態確認、結果取得などを行います。",
                "enumValues": [
                  "fix_input",
                  "authenticate",
                  "add_funds",
                  "retry_later",
                  "poll_status",
                  "inspect_events",
                  "contact_support"
                ]
              },
              "details": {
                "description": "失敗原因を調べるための補足情報。内容はエラーコードごとに異なります。"
              }
            }
          }
        }
      },
      "example": {
        "error": {
          "code": "provider_capacity_exceeded",
          "message": "モデルの処理枠が埋まっています。retry-after 後に同じ入力と冪等性キーで再試行してください。",
          "request_id": "req_00000000000000000000000000000000",
          "category": "capacity",
          "stage": "submission",
          "retryable": true,
          "retry_after_seconds": 30,
          "public_reason": "provider_capacity_exceeded",
          "next_action": "retry_later"
        }
      }
    }
  ]
}
```

## Examples

```cURL
curl --request POST 'https://api.orchestor.io/v1/creative/files/generate-upload-url' \
  --header "Authorization: Bearer $ORCHESTOR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{"content_type": "image/png", "size_bytes": 482113}'
```

```JavaScript
// Node.js 24 以上のサーバー側で実行します。
const response = await fetch("https://api.orchestor.io/v1/creative/files/generate-upload-url", {
  method: "POST",
  headers: {"Authorization": `Bearer ${process.env.ORCHESTOR_API_KEY}`, "Content-Type": "application/json"},
  body: JSON.stringify({"content_type": "image/png", "size_bytes": 482113}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
console.log(result);
```

```Python
import os
import requests

response = requests.request(
    'POST',
    'https://api.orchestor.io/v1/creative/files/generate-upload-url',
    headers={'Authorization': f"Bearer {os.environ['ORCHESTOR_API_KEY']}", 'Content-Type': 'application/json'},
    json={'content_type': 'image/png', 'size_bytes': 482113},
    timeout=60,
)
response.raise_for_status()
print(response.json())
```

---

[Documentation index](https://orchestor.io/docs/llms.txt)
