openapi: 3.0.1 info: title: GroqCloud Audio Embeddings API description: Specification of the Groq cloud API termsOfService: https://groq.com/terms-of-use/ contact: name: Groq Support email: support@groq.com version: '2.1' servers: - url: https://api.groq.com security: - api_key: [] tags: - name: Embeddings paths: /openai/v1/embeddings: post: operationId: createEmbedding tags: - Embeddings summary: Creates an embedding vector representing the input text. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateEmbeddingRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CreateEmbeddingResponse' components: schemas: CreateEmbeddingResponse: type: object properties: data: type: array description: The list of embeddings generated by the model. items: $ref: '#/components/schemas/Embedding' model: type: string description: The name of the model used to generate the embedding. object: type: string description: The object type, which is always "list". enum: - list usage: type: object description: The usage information for the request. properties: prompt_tokens: type: integer description: The number of tokens used by the prompt. total_tokens: type: integer description: The total number of tokens used by the request. required: - prompt_tokens - total_tokens required: - object - model - data - usage Embedding: type: object description: 'Represents an embedding vector returned by embedding endpoint. ' properties: index: type: integer description: The index of the embedding in the list of embeddings. embedding: oneOf: - type: array description: 'The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings). ' items: type: number - type: string description: 'The embedding vector, which is a base64 encoded string. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings). ' object: type: string description: The object type, which is always "embedding". enum: - embedding required: - index - object - embedding CreateEmbeddingRequest: type: object additionalProperties: false properties: input: description: 'Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model, cannot be an empty string, and any array must be 2048 dimensions or less. ' example: The quick brown fox jumped over the lazy dog oneOf: - type: string title: string description: The string that will be turned into an embedding. default: '' example: This is a test. - type: array title: array description: The array of strings that will be turned into an embeddings. minItems: 1 maxItems: 2048 items: type: string default: '' example: '[''This is a test.'']' x-groq-meta: validator: EmbeddingInput model: description: 'ID of the model to use. ' example: nomic-embed-text-v1_5 anyOf: - type: string - type: string enum: - nomic-embed-text-v1_5 encoding_format: description: The format to return the embeddings in. Can only be `float` or `base64`. example: float default: float type: string enum: - float - base64 user: type: string description: A unique identifier representing your end-user, which can help us monitor and detect abuse. nullable: true required: - model - input securitySchemes: api_key: type: http scheme: bearer bearerFormat: apiKey x-groq-metadata: groups: - id: chat type: endpoints title: Chat description: '' sections: - type: endpoint key: createChatCompletion path: create - id: responses type: endpoints title: Responses (beta) description: '' sections: - type: endpoint key: createResponse path: create - id: audio type: endpoints title: Audio description: '' sections: - type: endpoint key: createTranscription path: transcription - type: endpoint key: createTranslation path: translation - type: endpoint key: createSpeech path: speech - id: models type: endpoints title: Models description: '' sections: - type: endpoint key: listModels path: list - type: endpoint key: retrieveModel path: retrieve - id: batches type: endpoints title: Batches description: '' sections: - type: endpoint key: createBatch path: create - type: endpoint key: retrieveBatch path: retrieve - type: endpoint key: listBatches path: list - type: endpoint key: cancelBatch path: cancel - id: files type: endpoints title: Files description: '' sections: - type: endpoint key: uploadFile path: upload - type: endpoint key: listFiles path: list - type: endpoint key: deleteFile path: delete - type: endpoint key: retrieveFile path: retrieve - type: endpoint key: downloadFile path: download - id: fine-tuning type: endpoints title: Fine Tuning description: '' sections: - type: endpoint key: listFineTunings path: list - type: endpoint key: createFineTuning path: create - type: endpoint key: getFineTuning path: get - type: endpoint key: deleteFineTuning path: delete