Hugging Face Multimodal API

Tasks involving multiple modalities

Operations 1

POST /models/{model_id}/text-to-image Text to Image Generation #

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-multimodal-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-multimodal-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hugging Face Inference Multimodal API
  description: Run inference on 200,000+ machine learning models hosted on the Hugging Face Hub with a simple HTTP request. Supports text generation, image classification, object detection, speech recognition, and many more tasks.
  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://api-inference.huggingface.co
  description: Hugging Face Inference API production server
security:
- bearerAuth: []
tags:
- name: Multimodal
  description: Tasks involving multiple modalities
paths:
  /models/{model_id}/text-to-image:
    post:
      summary: Text to Image Generation
      description: Generate an image from a text prompt using a diffusion model.
      operationId: textToImage
      tags:
      - Multimodal
      parameters:
      - name: model_id
        in: path
        required: true
        schema:
          type: string
        example: stabilityai/stable-diffusion-xl-base-1.0
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextToImageRequest'
            examples:
              TexttoimageRequestExample:
                summary: Default textToImage request
                x-microcks-default: true
                value:
                  inputs: example_value
                  parameters:
                    negative_prompt: example_value
                    height: 10
                    width: 10
                    num_inference_steps: 10
                    guidance_scale: 42.5
      responses:
        '200':
          description: Generated image
          content:
            image/png:
              schema:
                type: string
                format: binary
              examples:
                Texttoimage200Example:
                  summary: Default textToImage 200 response
                  x-microcks-default: true
                  value: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    TextToImageRequest:
      type: object
      required:
      - inputs
      properties:
        inputs:
          type: string
          description: The text prompt to generate an image from
          example: A beautiful sunset over mountains
        parameters:
          type: object
          properties:
            negative_prompt:
              type: string
              description: Text describing what to avoid in the image
            height:
              type: integer
              description: Height of the generated image in pixels
            width:
              type: integer
              description: Width of the generated image in pixels
            num_inference_steps:
              type: integer
              description: Number of denoising steps
            guidance_scale:
              type: number
              format: float
              description: Classifier-free guidance scale
          example: example_value
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: HF Token
      description: Hugging Face API token. Generate one from https://huggingface.co/settings/tokens