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

# List architectures

> GET /v1/architectures returns every model the Mage API can generate with, each with its input fields, option tokens, defaults, JSON Schema, and gem price.

The API describing itself: every architecture you can generate with, in one call. Use it to build a model picker, to validate a request before sending it, or to read the field names and tokens of a model at runtime instead of hard-coding them. The list changes without a version bump: architectures appear when they launch and disappear when they are retired.

Each entry carries `image_inputs` and `video_inputs` (the config field each media role writes to, so you can tell an image-to-video model from a text-only one before submitting), `options` and `options_by_model` (the tokens each adjustable field accepts, narrowed per variant), `input_schema` (the request body as JSON Schema, defaults folded in), `gems` (the price of the default config), and `generate_url`.


## OpenAPI

````yaml api/openapi.json GET /v1/architectures
openapi: 3.1.0
info:
  title: Mage API
  version: v1
  description: >-
    Run Mage models from your own code: submit a generation, poll its status,
    download the result. Every request is paid in gems.
  contact:
    name: Mage
    url: https://www.mage.space
    email: mage@mage.space
servers:
  - url: https://api.mage.space
    description: Production
security:
  - apiKey: []
tags:
  - name: Requests
    description: Submit, poll, and cancel generations.
  - name: Catalog
    description: What the API can generate with.
  - name: Account
    description: The gems balance.
  - name: Uploads
    description: Large input files.
  - name: Image models
    description: One endpoint per image architecture.
  - name: Video models
    description: One endpoint per video architecture.
paths:
  /v1/architectures:
    get:
      tags:
        - Catalog
      summary: List architectures
      description: >-
        Every architecture the API can generate with, with its fields, tokens,
        defaults, and price.
      operationId: list_architectures
      responses:
        '200':
          description: The catalog.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchitectureList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ArchitectureList:
      type: object
      properties:
        architectures:
          type: array
          items:
            $ref: '#/components/schemas/Architecture'
      required:
        - architectures
    Architecture:
      type: object
      properties:
        id:
          type: string
          description: The architecture id, as used in its endpoint path.
        name:
          type: string
          description: The display name.
        type:
          type: string
          enum:
            - image
            - video
            - audio
          description: What the architecture generates.
        description:
          type: string
          description: What the model is for and its usage rules.
        image_inputs:
          type: object
          properties:
            first_frame:
              anyOf:
                - type: string
                - type: 'null'
              description: The field a first frame image goes in, or null.
            last_frame:
              anyOf:
                - type: string
                - type: 'null'
              description: The field a last frame image goes in, or null.
            references:
              anyOf:
                - type: object
                  properties:
                    field:
                      type: string
                      description: The field the first reference image goes in.
                    additional_field:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: The list field further reference images go in, or null.
                  required:
                    - field
                    - additional_field
                  additionalProperties: false
                - type: 'null'
              description: >-
                Reference image fields, or null when the architecture takes
                none.
          required:
            - first_frame
            - last_frame
            - references
          additionalProperties: false
          description: >-
            The config field each image role writes to; an absent role is not
            supported.
        video_inputs:
          anyOf:
            - type: object
              properties:
                field:
                  type: string
                  description: The field holding the source video or videos.
              required:
                - field
              additionalProperties: false
            - type: 'null'
          description: >-
            The source-video field, or null when the architecture takes no
            video.
        base_config:
          type: object
          propertyNames:
            type: string
          additionalProperties: true
          description: The default config every request starts from.
        options:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: array
            items:
              type: string
          description: Allowed tokens per adjustable field, across all variants.
        options_by_model:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: object
            propertyNames:
              type: string
            additionalProperties:
              type: array
              items:
                type: string
          description: >-
            Per-variant narrowing of `options`, keyed by `model_id`; empty when
            variants share the lists.
        input_schema:
          type: object
          properties:
            properties:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: object
                propertyNames:
                  type: string
                additionalProperties: true
            required:
              type: array
              items:
                type: string
          required:
            - properties
            - required
          additionalProperties: true
          description: The request body as JSON Schema (draft 2020-12), defaults folded in.
        gems:
          type: number
          description: The gem price of the default config.
        generate_url:
          type: string
          format: uri
          description: The endpoint to submit a generation to.
      required:
        - id
        - name
        - type
        - description
        - image_inputs
        - video_inputs
        - base_config
        - options
        - options_by_model
        - input_schema
        - gems
        - generate_url
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - invalid_request
                - invalid_config
                - architecture_not_found
                - architecture_retired
                - request_not_found
                - not_found
                - insufficient_gems
                - forbidden
                - content_blocked
                - request_finished
                - too_many_requests
                - generation_failed
                - internal_error
              description: A stable error code; treat an unknown code by its HTTP status.
            message:
              type: string
              description: What went wrong, for a person.
            request_id:
              description: >-
                The request the refusal belongs to, when one was recorded before
                the refusal.
              type: string
              format: uuid
            gems_required:
              description: The price of the refused generation, on `insufficient_gems`.
              type: number
            docs_url:
              description: Where to read the API reference, on `not_found`.
              type: string
              format: uri
          required:
            - code
            - message
          additionalProperties: true
          description: Further fields depend on the code.
      required:
        - error
      additionalProperties: false
  responses:
    Unauthorized:
      description: The key is missing, malformed, unknown, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: The API key is invalid or has been revoked.
    InternalError:
      description: >-
        Something failed on Mage's side. Retry, and contact support if it
        persists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: internal_error
              message: >-
                Something went wrong on our side. Retry, and contact support if
                it persists.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from Settings → API, sent as `Authorization: Bearer
        mage_sk_…`. Keys are for server-side code only.

````