Hugging Face Embeddings API

Text embedding endpoints

Operations 1

POST /v1/embeddings Create Embeddings #

Documentation

Specifications

SDKs

Other Resources

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/hugging-face-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

hugging-face-embeddings-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hugging Face Inference Providers Embeddings API
  description: Unified proxy layer providing access to 15+ inference partners through a single OpenAI-compatible endpoint. Route requests to providers like AWS, Google, Azure, Together, Fireworks, and more through a consistent API with automatic model routing and provider selection.
  version: 1.0.0
  termsOfService: https://huggingface.co/terms-of-service
  contact:
    name: Hugging Face Support
    url: https://huggingface.co/support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://router.huggingface.co
  description: Hugging Face Inference Providers router
security:
- bearerAuth: []
tags:
- name: Embeddings
  description: Text embedding endpoints
paths:
  /v1/embeddings:
    post:
      summary: Create Embeddings
      description: Create embedding vectors for input text. Returns dense vector representations useful for semantic search, clustering, and classification tasks.
      operationId: createEmbeddings
      tags:
      - Embeddings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingRequest'
            examples:
              CreateembeddingsRequestExample:
                summary: Default createEmbeddings request
                x-microcks-default: true
                value:
                  model: example_value
                  input: example_value
                  encoding_format: float
      responses:
        '200':
          description: Embedding response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
              examples:
                Createembeddings200Example:
                  summary: Default createEmbeddings 200 response
                  x-microcks-default: true
                  value:
                    object: example_value
                    data:
                    - object: example_value
                      index: 10
                      embedding:
                      - {}
                    model: example_value
                    usage:
                      prompt_tokens: 10
                      total_tokens: 10
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Createembeddings400Example:
                  summary: Default createEmbeddings 400 response
                  x-microcks-default: true
                  value:
                    error:
                      message: example_value
                      type: example_value
                      code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            type:
              type: string
              description: Error type
            code:
              type: string
              description: Error code
          example: example_value
    EmbeddingRequest:
      type: object
      required:
      - model
      - input
      properties:
        model:
          type: string
          description: Embedding model ID
          example: sentence-transformers/all-MiniLM-L6-v2
        input:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
          description: Text input(s) to embed
          example: example_value
        encoding_format:
          type: string
          enum:
          - float
          - base64
          default: float
          example: float
    EmbeddingResponse:
      type: object
      properties:
        object:
          type: string
          const: list
          example: example_value
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                const: embedding
              index:
                type: integer
              embedding:
                type: array
                items:
                  type: number
                  format: float
          example: []
        model:
          type: string
          example: example_value
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            total_tokens:
              type: integer
          example: example_value
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: HF Token
      description: Hugging Face API token with Inference Providers permission. Generate from https://huggingface.co/settings/tokens