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

# ファイルストリームアップロード

> - multipart/form-data形式でファイルをアップロード
- アンダースコアとキャメルケースの両方のパラメータ命名に対応
- ローカルファイルの直接アップロードに適しています
- ファイルは72時間後に期限切れになります
- 現在のユーザークォータには制限があります。クォータを使い切るとアップロードに失敗します。永続的な保存が必要な場合はローカルに保存してください

**注意：**
ファイルアップロードAPIのベースURLは`https://files-api.evolink.ai`です



## OpenAPI

````yaml ja/api-manual/file-series/upload-stream.json POST /api/v1/files/upload/stream
openapi: 3.1.0
info:
  title: ファイルストリームアップロードAPI
  description: multipart/form-data でファイルサーバーにファイルをアップロード
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://files-api.evolink.ai
    description: ファイルサービス環境
security:
  - bearerAuth: []
tags:
  - name: ファイルアップロード
    description: ファイルアップロード関連API
paths:
  /api/v1/files/upload/stream:
    post:
      tags:
        - ファイルアップロード
      summary: ファイルストリームアップロード
      description: |-
        - multipart/form-data形式でファイルをアップロード
        - アンダースコアとキャメルケースの両方のパラメータ命名に対応
        - ローカルファイルの直接アップロードに適しています
        - ファイルは72時間後に期限切れになります
        - 現在のユーザークォータには制限があります。クォータを使い切るとアップロードに失敗します。永続的な保存が必要な場合はローカルに保存してください

        **注意：**
        ファイルアップロードAPIのベースURLは`https://files-api.evolink.ai`です
      operationId: uploadFileStream
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/StreamUploadRequest'
            examples:
              stream_upload:
                summary: ファイルストリームアップロード
                value:
                  file: '@/path/to/file.png'
      responses:
        '200':
          description: ファイルのアップロードに成功しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadResponse'
components:
  schemas:
    StreamUploadRequest:
      type: object
      required:
        - file
      properties:
        file:
          type: string
          format: binary
          description: >-
            ファイルバイナリデータ


            **注意：**

            - form-data形式でアップロード

            - システムがファイルタイプを自動識別

            - リクエストあたり最大`1`枚の画像

            -
            現在アップロード可能なファイル形式：`image/jpeg`、`image/png`、`image/gif`、`image/webp`のみ
        upload_path:
          type: string
          description: |-
            カスタムアップロードパス

            **注意：**
            - アンダースコア命名に対応：`upload_path`
            - キャメルケース命名に対応：`uploadPath`
            - 指定しない場合、システムがファイルタイプに基づいて自動的に分類します
          example: photos
        file_name:
          type: string
          description: |-
            カスタムファイル名

            **注意：**
            - アンダースコア命名に対応：`file_name`
            - キャメルケース命名に対応：`fileName`
            - 指定しない場合、システムが自動的に一意のファイル名を生成します
          example: photo.png
    FileUploadResponse:
      type: object
      properties:
        success:
          type: boolean
          description: リクエストが成功したかどうか
          example: true
        code:
          type: integer
          description: レスポンスステータスコード
          example: 200
        msg:
          type: string
          description: レスポンスメッセージ
          example: ファイルのアップロードに成功しました
        data:
          $ref: '#/components/schemas/FileData'
    FileData:
      type: object
      properties:
        file_id:
          type: string
          description: 一意のファイル識別子
          example: file_abc123
        file_name:
          type: string
          description: 保存されたファイル名
          example: photo.png
        original_name:
          type: string
          description: 元のファイル名
          example: photo.png
        file_size:
          type: integer
          description: ファイルサイズ（バイト）
          example: 2048
        mime_type:
          type: string
          description: ファイルMIMEタイプ
          example: image/png
        upload_path:
          type: string
          description: ファイル保存パス
          example: photos
        file_url:
          type: string
          format: uri
          description: ファイルアクセスURL
          example: https://files.evolink.ai/photos/photo.png
        download_url:
          type: string
          format: uri
          description: ファイルダウンロードURL
          example: https://files.evolink.ai/api/v1/files/download/file_abc123
        upload_time:
          type: string
          format: date-time
          description: アップロード時間（ISO 8601 フォーマット）
          example: '2025-10-09T00:00:00+08:00'
        expires_at:
          type: string
          format: date-time
          description: ファイル有効期限（ISO 8601形式）
          example: '2025-10-12T00:00:00+08:00'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````