Jina AI Embeddings API

Synchronous embedding generation

OpenAPI Specification

jina-ai-embeddings-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Jina AI Batch Embeddings API
  description: Generate high-quality multimodal embeddings for text, image, and code inputs using Jina AI's state-of-the-art embedding models. Supports synchronous embedding requests and batch jobs for large workloads.
  version: '1.0'
  contact:
    name: Jina AI
    url: https://jina.ai
servers:
- url: https://api.jina.ai/v1
  description: Jina AI production API
security:
- BearerAuth: []
tags:
- name: Embeddings
  description: Synchronous embedding generation
paths:
  /embeddings:
    post:
      tags:
      - Embeddings
      summary: Create embeddings
      description: Generate vector embeddings for one or more text, image, or code inputs.
      operationId: createEmbeddings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingRequest'
      responses:
        '200':
          description: Embeddings successfully generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
components:
  schemas:
    EmbeddingObject:
      type: object
      properties:
        object:
          type: string
          example: embedding
        index:
          type: integer
        embedding:
          type: array
          items:
            type: number
            format: float
    EmbeddingResponse:
      type: object
      properties:
        model:
          type: string
        object:
          type: string
          example: list
        usage:
          $ref: '#/components/schemas/Usage'
        data:
          type: array
          items:
            $ref: '#/components/schemas/EmbeddingObject'
    Usage:
      type: object
      properties:
        total_tokens:
          type: integer
        prompt_tokens:
          type: integer
    EmbeddingRequest:
      type: object
      required:
      - model
      - input
      properties:
        model:
          type: string
          description: Embedding model identifier
          example: jina-embeddings-v4
          enum:
          - jina-embeddings-v5-text-small
          - jina-embeddings-v5-text-nano
          - jina-embeddings-v4
          - jina-embeddings-v3
          - jina-clip-v2
        input:
          type: array
          description: Inputs to embed (text strings or image references)
          items:
            type: string
        task:
          type: string
          description: Downstream task to optimize the embedding for
          enum:
          - retrieval.query
          - retrieval.passage
          - text-matching
          - classification
          - clustering
        dimensions:
          type: integer
          description: Optional truncation length for output vectors
        normalized:
          type: boolean
          description: Whether to L2-normalize the output vectors
        embedding_type:
          type: string
          enum:
          - float
          - base64
          - binary
          - ubinary
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key