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

# ファイルをアップロード



## OpenAPI

````yaml /docflow-global/ja/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/file/upload
openapi: 3.0.0
info:
  title: DocFlow API
  description: DocFlow REST API。ファイルアップロードとファイル処理結果の取得機能を提供します。
  version: 2.8.4
  contact:
    name: TextIn
    url: https://www.textin.ai/contact?type=27&sub_type=1
servers:
  - url: https://docflow.textin.ai
security:
  - ApiId: []
    SecretCode: []
tags:
  - name: ワークスペース管理
    description: ワークスペース関連 API
  - name: ファイルカテゴリ
    description: ファイルカテゴリ関連 API
  - name: ファイルカテゴリサンプル
    description: ファイルカテゴリサンプル関連 API
  - name: スマートレビュー
    description: スマートレビュー関連 API
  - name: 廃止済み
    description: 廃止済み API
paths:
  /api/app-api/sip/platform/v2/file/upload:
    post:
      summary: ファイルをアップロード
      operationId: uploadFile
      parameters:
        - $ref: '#/components/parameters/WorkspaceId'
        - $ref: '#/components/parameters/Category'
        - $ref: '#/components/parameters/BatchNumber'
        - $ref: '#/components/parameters/AutoVerifyVat'
        - $ref: '#/components/parameters/SplitFlag'
        - $ref: '#/components/parameters/CropFlag'
        - $ref: '#/components/parameters/TargetProcess'
        - $ref: '#/components/parameters/ParserRemoveWatermark'
        - $ref: '#/components/parameters/ParserCropDewarp'
        - $ref: '#/components/parameters/ParserApplyMerge'
        - $ref: '#/components/parameters/ParserFormulaLevel'
        - $ref: '#/components/parameters/ParserTableTextSplitMode'
        - $ref: '#/components/parameters/ParserDpi'
        - $ref: '#/components/parameters/ParserParseMode'
        - $ref: '#/components/parameters/ParserPdfPwd'
      requestBody:
        $ref: '#/components/requestBodies/FileUploadRequestBody'
      responses:
        '200':
          description: ファイルアップロードに成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          batch_number:
                            type: string
                            description: バッチ番号
                            example: 202412190001
                          files:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: ファイル ID
                                  example: 202412190001
                                task_id:
                                  type: string
                                  description: タスク ID
                                  example: 1981692246135111700
                                name:
                                  type: string
                                  description: ファイル名
                                  example: invoice.pdf
                                format:
                                  type: string
                                  description: ファイル形式
                                  example: pdf
                              required:
                                - id
                                - name
                                - format
                        required:
                          - batch_number
                          - files
components:
  parameters:
    WorkspaceId:
      name: workspace_id
      in: query
      description: ワークスペース ID
      required: true
      schema:
        type: string
        example: 1234567890
    Category:
      name: category
      in: query
      description: ファイルカテゴリ
      required: false
      schema:
        type: string
        example: invoice
    BatchNumber:
      name: batch_number
      in: query
      description: >
        バッチ番号。同じバッチ番号で複数回アップロードできます。後からそのバッチ番号を使って、同一バッチ内の複数ファイルの処理結果を取得できます。値が空の場合、システムが最大
        20 文字の文字列を自動生成します。
      required: false
      schema:
        type: string
        example: 202412190001
    AutoVerifyVat:
      name: auto_verify_vat
      in: query
      description: VAT インボイスを自動検証するかどうか
      required: false
      schema:
        type: boolean
        default: false
    SplitFlag:
      name: split_flag
      in: query
      description: ファイル分割を実行するかどうか
      required: false
      schema:
        type: boolean
        default: false
    CropFlag:
      name: crop_flag
      in: query
      description: 複数画像クロップを実行するかどうか
      required: false
      schema:
        type: boolean
        default: false
    TargetProcess:
      name: target_process
      in: query
      description: |
        対象処理タイプ。指定可能な値: - classify: 分類 - extract: 抽出
      required: false
      schema:
        type: string
        enum:
          - classify
          - extract
        example: classify
    ParserRemoveWatermark:
      name: parser_remove_watermark
      in: query
      description: '透かし除去（0: いいえ、1: はい）'
      required: false
      schema:
        type: integer
        default: 0
    ParserCropDewarp:
      name: parser_crop_dewarp
      in: query
      description: 'クロップと歪み補正（0: いいえ、1: はい）'
      required: false
      schema:
        type: integer
        default: 0
    ParserApplyMerge:
      name: parser_apply_merge
      in: query
      description: 'ページをまたぐ段落とテーブルを結合（0: いいえ、1: はい）'
      required: false
      schema:
        type: integer
        default: 1
    ParserFormulaLevel:
      name: parser_formula_level
      in: query
      description: '数式認識レベル（0: 表示数式とインライン数式を認識、1: 表示数式のみ認識、2: 数式を認識しない）'
      required: false
      schema:
        type: integer
        default: 0
    ParserTableTextSplitMode:
      name: parser_table_text_split_mode
      in: query
      description: 'テーブル罫線と交差するテキストブロックを分割（0: いいえ、1: はい）'
      required: false
      schema:
        type: integer
        default: 0
    ParserDpi:
      name: parser_dpi
      in: query
      description: 'ファイル解像度（144: デフォルト、216: 高精度）'
      required: false
      schema:
        type: integer
        default: 144
        enum:
          - 144
          - 216
    ParserParseMode:
      name: parser_parse_mode
      in: query
      description: |
        解析モード
        - `auto`: 自動（デフォルト）
        - `scan`: スキャン文書モード
        - `vlm`: VLM モード
      required: false
      schema:
        type: string
        enum:
          - auto
          - scan
          - vlm
    ParserPdfPwd:
      name: parser_pdf_pwd
      in: query
      description: 暗号化 PDF ファイルを復号するための PDF パスワード
      required: false
      schema:
        type: string
  requestBodies:
    FileUploadRequestBody:
      description: ファイルアップロードのリクエストボディ
      required: true
      content:
        multipart/form-data:
          schema:
            type: object
            properties:
              file:
                type: string
                format: binary
        application/json:
          schema:
            type: object
            properties:
              urls:
                description: |
                  ファイル URL リスト
                  1 回のアップロードで最大 10 個のファイル URL に対応し、各ファイルは最大 100MB です
                type: array
                items:
                  type: string
                  description: ファイル URL
                  example: https://example.com/file.pdf
                  pattern: ^https?://.*$
                maxItems: 10
            required:
              - urls
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: ステータスコード
          example: 200
        msg:
          type: string
          description: ステータス説明
      required:
        - code
        - msg
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````