OpenAI APIs Embeddings API

Text embedding operations

Operations 1

POST /embeddings OpenAI APIs Create embeddings #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/openai-apis-embeddings-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

openai-apis-embeddings-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenAI APIs OpenAI Assistants Embeddings API
  description: API for building AI assistants with custom instructions, knowledge retrieval, code execution, and function calling capabilities. Supports managing assistants, threads, messages, and runs.
  version: '2.0'
  contact:
    name: OpenAI Support
    email: support@openai.com
    url: https://help.openai.com
  termsOfService: https://openai.com/policies/terms-of-use
servers:
- url: https://api.openai.com/v1
  description: OpenAI Production API
security:
- bearerAuth: []
tags:
- name: Embeddings
  description: Text embedding operations
paths:
  /embeddings:
    post:
      operationId: createEmbedding
      summary: OpenAI APIs Create embeddings
      description: Creates an embedding vector representing the input text. The resulting vector can be used for semantic search, clustering, and other tasks.
      tags:
      - Embeddings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEmbeddingRequest'
      responses:
        '200':
          description: Embedding response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized - invalid or missing API key
        '429':
          description: Rate limit exceeded
        '500':
          description: Server error
components:
  schemas:
    EmbeddingResponse:
      type: object
      properties:
        object:
          type: string
          enum:
          - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Embedding'
        model:
          type: string
          description: The model used for embedding
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
              description: Number of tokens in the input
            total_tokens:
              type: integer
              description: Total number of tokens used
    Embedding:
      type: object
      properties:
        object:
          type: string
          enum:
          - embedding
        embedding:
          oneOf:
          - type: array
            items:
              type: number
          - type: string
          description: The embedding vector (float array or base64)
        index:
          type: integer
          description: The index of the embedding in the list of embeddings
    CreateEmbeddingRequest:
      type: object
      required:
      - model
      - input
      properties:
        input:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
          - type: array
            items:
              type: integer
          - type: array
            items:
              type: array
              items:
                type: integer
          description: Input text to embed, as a string or array of strings/tokens
        model:
          type: string
          description: ID of the model to use (e.g., text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large)
          examples:
          - text-embedding-3-small
        encoding_format:
          type: string
          enum:
          - float
          - base64
          default: float
          description: The format to return the embeddings in
        dimensions:
          type: integer
          description: The number of dimensions the resulting output embeddings should have. Supported in text-embedding-3 and later models.
        user:
          type: string
          description: A unique identifier representing your end-user
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: OpenAI API key passed as a Bearer token
externalDocs:
  description: OpenAI Assistants API Documentation
  url: https://platform.openai.com/docs/api-reference/assistants