DeepInfra Images API

The Images API from DeepInfra — 1 operation(s) for images.

OpenAPI Specification

deepinfra-images-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: DeepInfra Inference Audio Images API
  description: OpenAI-compatible inference API for DeepInfra's 100+ open-source models. Covers chat completions, text completions, embeddings, audio (transcriptions, translations, text-to-speech), image generation, and model listing. Authenticated with a Bearer API token.
  version: 1.0.0
servers:
- url: https://api.deepinfra.com/v1/openai
  description: OpenAI-compatible base URL
- url: https://api.deepinfra.com
  description: DeepInfra native base URL
security:
- bearerAuth: []
tags:
- name: Images
paths:
  /images/generations:
    post:
      tags:
      - Images
      summary: Generate images from a prompt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - model
              - prompt
              properties:
                model:
                  type: string
                prompt:
                  type: string
                n:
                  type: integer
                size:
                  type: string
                response_format:
                  type: string
                  enum:
                  - url
                  - b64_json
      responses:
        '200':
          description: Generated images
          content:
            application/json:
              schema:
                type: object
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: DeepInfra API token (DEEPINFRA_TOKEN) sent as a Bearer token.