openapi: 3.2.0 info: title: Voyage AI Embeddings API version: 1.0.0 summary: Embeddings, multimodal embeddings, contextualized embeddings, and reranking from Voyage AI. description: 'OpenAI-compatible REST API for Voyage AI embedding and reranker models used in retrieval-augmented generation (RAG) and semantic search workflows. Documentation: https://docs.voyageai.com/reference/embeddings-api ' contact: name: Voyage AI Docs url: https://docs.voyageai.com/ servers: - url: https://api.voyageai.com/v1 description: Voyage AI production API security: - bearerAuth: [] tags: - name: Embeddings description: Dense text embeddings. paths: /embeddings: post: tags: - Embeddings summary: Create text embeddings operationId: createEmbeddings requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmbeddingsRequest' responses: '200': description: Embeddings response content: application/json: schema: $ref: '#/components/schemas/EmbeddingsResponse' '401': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/RateLimited' components: schemas: EmbeddingsRequest: type: object required: - input - model properties: input: oneOf: - type: string - type: array items: type: string maxItems: 1000 description: A single string or list of strings (max 1000) to embed. model: type: string examples: - voyage-3.5 - voyage-3-large - voyage-code-3 - voyage-finance-2 - voyage-law-2 - voyage-4 - voyage-4-large - voyage-4-lite input_type: type: string enum: - query - document description: Optimization hint for downstream retrieval use. truncation: type: boolean default: true output_dimension: type: integer enum: - 256 - 512 - 1024 - 2048 output_dtype: type: string enum: - float - int8 - uint8 - binary - ubinary default: float encoding_format: type: string enum: - base64 Error: type: object properties: detail: type: string EmbeddingsResponse: type: object properties: object: type: string examples: - list data: type: array items: type: object properties: object: type: string examples: - embedding index: type: integer embedding: oneOf: - type: array items: type: number - type: string description: Base64-encoded vector when `encoding_format=base64`. model: type: string usage: $ref: '#/components/schemas/Usage' Usage: type: object properties: total_tokens: type: integer responses: Unauthorized: description: Missing or invalid API key content: application/json: schema: $ref: '#/components/schemas/Error' RateLimited: description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API key description: 'Voyage AI API key sent as `Authorization: Bearer `.'