openapi: 3.1.0 info: title: Microsoft Azure Cognitive Services Accounts Embeddings API description: APIs for vision, speech, language, and decision-making AI capabilities including Computer Vision, Text Analytics, and Translator services. version: '3.2' contact: name: Microsoft Azure Support url: https://azure.microsoft.com/en-us/support/ termsOfService: https://www.microsoft.com/en-us/legal/terms-of-use servers: - url: https://{region}.api.cognitive.microsoft.com description: Azure Cognitive Services Regional Endpoint variables: region: default: eastus description: Azure region for the Cognitive Services resource security: - apiKey: [] tags: - name: Embeddings description: Create vector embeddings from text paths: /deployments/{deployment-id}/embeddings: post: operationId: createEmbedding summary: Microsoft Create embeddings description: Get a vector representation of a given input that can be consumed by machine learning models and algorithms. tags: - Embeddings parameters: - $ref: '#/components/parameters/deploymentId' - $ref: '#/components/parameters/apiVersion' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmbeddingRequest' responses: '200': description: Embedding response content: application/json: schema: $ref: '#/components/schemas/EmbeddingResponse' '400': description: Invalid request '401': description: Unauthorized '429': description: Rate limit exceeded components: schemas: EmbeddingRequest: type: object required: - input properties: input: oneOf: - type: string - type: array items: type: string description: Input text to embed encoding_format: type: string enum: - float - base64 default: float EmbeddingResponse: type: object properties: object: type: string enum: - list data: type: array items: type: object properties: object: type: string enum: - embedding embedding: type: array items: type: number index: type: integer model: type: string usage: type: object properties: prompt_tokens: type: integer total_tokens: type: integer parameters: apiVersion: name: api-version in: query required: true description: The API version to use schema: type: string default: '2024-10-21' deploymentId: name: deployment-id in: path required: true description: The deployment name for the model schema: type: string securitySchemes: apiKey: type: apiKey name: Ocp-Apim-Subscription-Key in: header description: Azure Cognitive Services subscription key externalDocs: description: Azure AI Services Documentation url: https://learn.microsoft.com/en-us/azure/ai-services/