> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bizmori.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 個別結果ファイルのダウンロード URL を発行

> 完了した埋め込み注文の結果ファイル 1 件のダウンロード URL を発行します。[`GET /api/v3/orders/{orderId}`](/ja/api-reference/orders/get-order-v3) の `outputs[].fileId` を使用します。

URL は 300 秒間有効です。保管期限を過ぎると `400 ORDER_EXPIRED` を返します。




## OpenAPI

````yaml ja/api-reference/openapi.yaml GET /api/v3/orders/{orderId}/files/{fileId}/download
openapi: 3.0.0
info:
  title: BIZ MORI API
  version: 2.0.0
  description: >-
    BIZ MORI API は、デジタルコンテンツ保護のための4つのコアサービスを提供します:

    - **Anti-AI**: 画像をAI学習から保護

    - **Watermark Embed**: 画像に不可視のデジタル watermark を埋め込み

    - **Watermark Extract**: 画像から watermark を抽出・検証

    - **AI Detection**: 画像がAI生成かどうかを検知

    - **テストAPIキー**: `sk_test_`
    プレフィックスのキーは同じBearer認証を使用し、実際の処理サービスの実行やクレジットの消費なしに注文ライフサイクルを検証できます。テストアップロードの内容は破棄され、結果ファイルは作成されません
  contact:
    name: BIZ MORI サポート
    email: support@bizmori.com
  license:
    name: Proprietary
    url: https://docs.bizmori.com/legal/terms
servers:
  - url: https://api.bizmori.com
    description: 本番環境
security: []
tags:
  - name: Anti-AI
    description: Anti-AI画像保護の注文
  - name: Watermark Embed
    description: watermark 埋め込みの注文
  - name: Watermark Extract
    description: watermark 抽出の注文
  - name: AI Detection
    description: AI生成画像検知の注文
  - name: Orders
    description: 注文の照会と管理
  - name: Webhooks
    description: Webhookの設定とイベント
  - name: Reports
    description: watermark 抽出・AI Detection 注文の PDF 分析レポート
paths:
  /api/v3/orders/{orderId}/files/{fileId}/download:
    get:
      tags:
        - Orders
      summary: 個別結果ファイルのダウンロード URL を発行
      description: >
        完了した埋め込み注文の結果ファイル 1 件のダウンロード URL を発行します。[`GET
        /api/v3/orders/{orderId}`](/ja/api-reference/orders/get-order-v3) の
        `outputs[].fileId` を使用します。


        URL は 300 秒間有効です。保管期限を過ぎると `400 ORDER_EXPIRED` を返します。
      operationId: downloadWatermarkV1OutputFile
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
            pattern: ^[0-9]{1,20}$
          description: 注文 ID
        - in: path
          name: fileId
          required: true
          schema:
            type: string
            pattern: ^[0-9]+-[0-9]+$
          description: '`{inputFileId}-{連番}` 形式の結果ファイル ID(`outputs[].fileId`)'
      responses:
        '200':
          description: 結果ファイルの署名付き URL(300 秒有効)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadLinkResponse'
        '400':
          description: 不正なリクエスト、未完了の注文、または保管期限を過ぎた注文(`ORDER_EXPIRED`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validation:
                  value:
                    code: VALIDATION_FAILED
                expired:
                  value:
                    code: ORDER_EXPIRED
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 注文が存在しないか、別のアカウントの注文
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: ORDER_NOT_FOUND
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >
            curl -X GET
            https://api.bizmori.com/api/v3/orders/ORDER_ID/files/FILE_ID/download
            \
              -H "Authorization: Bearer YOUR_API_KEY"
        - lang: javascript
          label: JavaScript
          source: >
            const orderId = 'ORDER_ID';

            const fileId = 'FILE_ID';

            const response = await
            fetch(`https://api.bizmori.com/api/v3/orders/${orderId}/files/${fileId}/download`,
            {
              headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
            });

            const { data } = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            order_id = 'ORDER_ID'
            file_id = 'FILE_ID'
            response = requests.get(
                f'https://api.bizmori.com/api/v3/orders/{order_id}/files/{file_id}/download',
                headers={'Authorization': 'Bearer YOUR_API_KEY'}
            )
            data = response.json()['data']
components:
  schemas:
    DownloadLinkResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - downloadUrl
            - expiresInSeconds
          properties:
            downloadUrl:
              type: string
              format: uri
              description: 300 秒間有効な署名付きダウンロード URL
            expiresInSeconds:
              type: integer
              example: 300
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: エラーコード
  responses:
    Unauthorized:
      description: 認証失敗
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_NOT_AUTHENTICATED
    InternalError:
      description: 内部サーバーエラー
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: SERVER_INTERNAL_ERROR
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        外部クライアントアクセス用のBearer APIキー。本番キーは `sk_` プレフィックスを使用し、テストキーは `sk_test_`
        プレフィックスを使用して、処理やクレジット消費なしに注文ライフサイクルを検証します。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.