> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepinfra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Model Schema



## OpenAPI

````yaml https://api.deepinfra.com/openapi.json get /models/{model_name}/schema/{variantKey}
openapi: 3.1.0
info:
  title: DeepInfra API
  description: >-
    The DeepInfra API provides serverless AI inference, custom model
    deployments, and GPU rentals.
  version: 1.0.0
servers:
  - url: https://api.deepinfra.com
security: []
tags:
  - name: Chat Completions
    description: OpenAI and Anthropic-compatible chat completion endpoints for LLMs.
  - name: Text Completions
    description: OpenAI-compatible text completion endpoints.
  - name: Embeddings
    description: Generate text embeddings for search and RAG.
  - name: Image Generation
    description: Generate, edit, and create variations of images.
  - name: Audio
    description: OpenAI-compatible speech synthesis, transcription, and translation.
  - name: Text to Speech
    description: ElevenLabs-compatible TTS endpoints and voice management.
  - name: Inference
    description: Native DeepInfra inference API for models and deployments.
  - name: Dedicated Models
    description: Deploy and manage private model instances with autoscaling.
  - name: GPU Rentals
    description: Rent dedicated GPU containers.
  - name: Models
    description: Browse, search, and manage AI models.
  - name: Files & Batches
    description: File uploads and batch processing.
  - name: LoRA Adapters
    description: Create, manage, and query LoRA adapter models.
  - name: Agents
    description: Manage agent-framework instances (OpenClaw and friends).
  - name: Sandboxes
    description: Create and manage isolated sandbox environments.
  - name: Account
    description: User profile, team management, and rate limits.
  - name: Authentication
    description: API tokens, SSH keys, scoped JWTs, and login flows.
  - name: Billing
    description: Payment methods, usage tracking, and billing.
  - name: Logs & Metrics
    description: Query inference logs, deployment logs, and usage metrics.
  - name: Utilities
    description: Feedback submission and CLI version.
paths:
  /models/{model_name}/schema/{variantKey}:
    get:
      tags:
        - Models
      summary: Model Schema
      operationId: model_schema_models__model_name__schema__variantKey__get
      parameters:
        - name: model_name
          in: path
          required: true
          schema:
            type: string
            title: Model Name
        - name: variantKey
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/SchemaVariantKey'
        - name: version
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Version
        - name: xi-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Xi-Api-Key
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaOut'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeepError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeepError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '423':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeepError'
          description: Locked
      security:
        - HTTPBearer: []
components:
  schemas:
    SchemaVariantKey:
      type: string
      enum:
        - default
        - openai-completions
        - openai-chat-completions
        - openai-embeddings
        - openai-speech-to-text
        - openai-tts
        - openai-images
        - openai-images-variations
        - openai-images-edits
        - elevenlabs-tts
        - create-voice
        - read-voice
        - update-voice
        - delete-voice
        - list-voices
        - ai-sdk
      title: SchemaVariantKey
    SchemaOut:
      properties:
        variant:
          $ref: '#/components/schemas/SchemaVariant'
        schema_in:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema In
        schema_out:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema Out
        schema_stream:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Schema Stream
        fields_in:
          items:
            $ref: '#/components/schemas/ModelFieldInfo'
          type: array
          title: Fields In
      type: object
      required:
        - variant
        - fields_in
      title: SchemaOut
    DeepError:
      properties:
        error:
          type: string
          title: Error
          description: Error
          examples:
            - Model not found
      type: object
      required:
        - error
      title: DeepError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SchemaVariant:
      properties:
        key:
          $ref: '#/components/schemas/SchemaVariantKey'
        url:
          type: string
          title: Url
      type: object
      required:
        - key
        - url
      title: SchemaVariant
    ModelFieldInfo:
      properties:
        name:
          type: string
          title: Name
        parent:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent
        ftype:
          type: string
          title: Ftype
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        allowed:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Allowed
        default:
          title: Default
        examples:
          items: {}
          type: array
          title: Examples
          default: []
        minimum:
          anyOf:
            - type: number
            - type: 'null'
          title: Minimum
        exclusiveMinimum:
          anyOf:
            - type: number
            - type: 'null'
          title: Exclusiveminimum
        maximum:
          anyOf:
            - type: number
            - type: 'null'
          title: Maximum
        exclusiveMaximum:
          anyOf:
            - type: number
            - type: 'null'
          title: Exclusivemaximum
      type: object
      required:
        - name
        - ftype
      title: ModelFieldInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````