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

# Trigger Embedding Bulk

> Manually enqueue embedding jobs for one or more files.

Each file must have upload_status=ready and embedding_status=pending or failed.
Returns a per-file result — successes are 'queued', failures include an error message.



## OpenAPI

````yaml /api/openapi.json post /v1/files/embed
openapi: 3.1.0
info:
  title: MeshAPI
  description: One key, all AI models.
  version: 0.1.0
servers:
  - url: https://api.meshapi.ai
security:
  - BearerAuth: []
paths:
  /v1/files/embed:
    post:
      tags:
        - RAG
      summary: Trigger Embedding Bulk
      description: >-
        Manually enqueue embedding jobs for one or more files.


        Each file must have upload_status=ready and embedding_status=pending or
        failed.

        Returns a per-file result — successes are 'queued', failures include an
        error message.
      operationId: trigger_embedding_bulk
      parameters:
        - in: header
          name: X-Mesh-Version
          required: false
          schema:
            type: string
            enum:
              - 2026-08
            default: 2026-08
          example: 2026-08
          description: >-
            Dated version of the API contract to pin this request to. Omit it
            and the request is served under `2026-08` — the oldest supported
            version, so an existing integration is never moved by a release. A
            malformed or unsupported value is rejected with `400
            invalid_api_version` rather than falling back silently. The version
            actually served is echoed as `X-Mesh-Version` on every response,
            including errors.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkEmbedRequest'
            examples:
              default:
                summary: Example request
                value:
                  file_ids:
                    - file_01JZ0S3N6M8ZQ8DGK9VY1R2H3T
                  wait: false
                  metadata:
                    source: docs
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkEmbedResponse'
              examples:
                default:
                  summary: Example response
                  value:
                    results:
                      - file_id: file_01JZ0S3N6M8ZQ8DGK9VY1R2H3T
                        embedding_status: queued
                        chunk_count: null
                        error: null
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    BulkEmbedRequest:
      properties:
        file_ids:
          items:
            type: string
          type: array
          maxItems: 100
          minItems: 1
          title: File Ids
        wait:
          type: boolean
          title: Wait
          default: false
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
        - file_ids
      title: BulkEmbedRequest
      example:
        file_ids:
          - file_123abc456def7890
    BulkEmbedResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/BulkEmbedResult'
          type: array
          title: Results
      type: object
      required:
        - results
      title: BulkEmbedResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkEmbedResult:
      properties:
        file_id:
          type: string
          title: File Id
        embedding_status:
          type: string
          title: Embedding Status
        chunk_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunk Count
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - file_id
        - embedding_status
      title: BulkEmbedResult
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter your MeshAPI key (`rsk_...`) — sent as `Authorization: Bearer
        <key>`.

````