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

# List models

> The models this organization can run, one entry per model and operation. Read a model to get the JSON Schema its requests follow.

Needs the `models:read` scope.



## OpenAPI

````yaml /openapi.json get /models
openapi: 3.1.0
info:
  title: ZeroGen API
  version: v1
  description: >-
    Generate images and video with every model in ZeroGen from your own servers.
    Generated from the API's contracts by `npm run openapi` in apps/web; do not
    edit by hand.
servers:
  - url: https://api.zerogen.com/v1
security:
  - bearerAuth: []
tags:
  - name: Account
    description: The calling key and the organization's balance.
  - name: Models
    description: The models an organization can run and their schemas.
  - name: Generations
    description: Quote, create, read, list and cancel generations.
  - name: Uploads
    description: Upload files into the Library to use as inputs.
paths:
  /models:
    get:
      tags:
        - Models
      summary: List models
      description: >-
        The models this organization can run, one entry per model and operation.
        Read a model to get the JSON Schema its requests follow.


        Needs the `models:read` scope.
      operationId: listModels
      parameters:
        - name: capability
          in: query
          required: false
          schema:
            type: string
            enum:
              - image
              - video
        - name: operation
          in: query
          required: false
          description: The model ID's operation segment
          schema:
            type: string
            enum:
              - generate
              - edit
              - inpaint
              - remix
              - text-to-vector
              - text-to-video
              - image-to-video
              - first-last-frame-to-video
              - keyframes-to-video
              - reference-to-video
              - audio-to-video
              - video-to-video
              - extend-video
              - motion-control
              - clean-plate
              - render-to-real
              - hdr
              - outpaint
              - reference-video-to-video
        - name: q
          in: query
          required: false
          description: >-
            Search model IDs and labels, including the maker and related
            operations
          schema:
            type: string
            minLength: 1
            maxLength: 200
        - name: frames
          in: query
          required: false
          description: Video models accepting at least these frame slots
          schema:
            type: string
            enum:
              - start
              - start-end
        - name: audio
          in: query
          required: false
          description: Video models that can generate audio
          schema:
            type: string
            const: 'true'
        - name: referenceKind
          in: query
          required: false
          description: Models accepting reference media of this kind
          schema:
            type: string
            enum:
              - image
              - video
              - audio
        - name: limit
          in: query
          required: false
          description: Models per page; default 20
          schema:
            type: integer
            minimum: 1
            maximum: 50
        - name: cursor
          in: query
          required: false
          description: nextCursor from the previous page, with the same filters
          schema:
            type: string
      responses:
        '200':
          description: A page of models.
          headers:
            Request-Id:
              $ref: '#/components/headers/Request-Id'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  headers:
    Request-Id:
      description: Identifies the request; quote it when contacting support.
      schema:
        type: string
    RateLimit-Limit:
      description: Requests the key may make in the current window.
      schema:
        type: integer
    RateLimit-Remaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the current window resets.
      schema:
        type: integer
    WWW-Authenticate:
      description: Bearer realm="ZeroGen API".
      schema:
        type: string
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  schemas:
    ModelList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
        nextCursor:
          description: Pass as cursor for the next page of models; null on the last page
          type:
            - string
            - 'null'
      required:
        - data
        - nextCursor
      additionalProperties: false
    Model:
      type: object
      properties:
        id:
          type: string
          maxLength: 200
          pattern: >-
            ^[a-z0-9]+(?:[.-][a-z0-9]+)*\/[a-z0-9]+(?:[.-][a-z0-9]+)*\/[a-z0-9]+(?:[.-][a-z0-9]+)*$
        name:
          type: string
        capability:
          type: string
          enum:
            - image
            - video
        operation:
          type: string
          enum:
            - generate
            - edit
            - inpaint
            - remix
            - text-to-vector
            - text-to-video
            - image-to-video
            - first-last-frame-to-video
            - keyframes-to-video
            - reference-to-video
            - audio-to-video
            - video-to-video
            - extend-video
            - motion-control
            - clean-plate
            - render-to-real
            - hdr
            - outpaint
            - reference-video-to-video
        status:
          type: string
          enum:
            - active
            - deprecated
        sunsetAt:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
            - type: 'null'
          description: A deprecated model refuses new requests from this time
      required:
        - id
        - name
        - capability
        - operation
        - status
        - sunsetAt
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
      additionalProperties: false
    Error:
      type: object
      properties:
        code:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,79}$
        message:
          type: string
        param:
          type: string
        retryable:
          type: boolean
        details:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
        - retryable
      additionalProperties: false
  responses:
    BadRequest:
      description: >-
        The request is malformed or invalid: invalid_request, validation_failed,
        model_unavailable or input_import_failed.
      headers:
        Request-Id:
          $ref: '#/components/headers/Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: 'invalid_api_key: the key is missing, revoked or expired.'
      headers:
        Request-Id:
          $ref: '#/components/headers/Request-Id'
        WWW-Authenticate:
          $ref: '#/components/headers/WWW-Authenticate'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        permission_denied: the key lacks the scope this endpoint needs, the
        request came from a browser, or the API isn't enabled for the
        organization.
      headers:
        Request-Id:
          $ref: '#/components/headers/Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: >-
        rate_limited: the key or its owner is over the rate limit, or the
        organization is at its running cap. Retry after Retry-After seconds.
      headers:
        Request-Id:
          $ref: '#/components/headers/Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: 'internal: something went wrong. Retry.'
      headers:
        Request-Id:
          $ref: '#/components/headers/Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServiceUnavailable:
      description: >-
        unavailable or pricing_unavailable: API keys, billing or pricing can't
        be reached right now. Retry.
      headers:
        Request-Id:
          $ref: '#/components/headers/Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.