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

# List generations

> Lists your generations from newest to oldest.



## OpenAPI

````yaml /hub/openapi/hub.json get /api/v1/hub/generations
openapi: 3.0.1
info:
  title: Fanify Hub API
  description: Generate media and text with Fanify credits. All prices use EUR.
  version: v1
servers:
  - url: https://fanifyai.com
security: []
paths:
  /api/v1/hub/generations:
    get:
      tags:
        - Generations
      summary: List generations
      description: Lists your generations from newest to oldest.
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            format: int32
            default: 30
        - name: cursor
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: array
            items:
              type: string
        - name: from
          in: query
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          schema:
            type: string
            format: date-time
        - name: model
          in: query
          schema:
            type: string
        - name: media_only
          in: query
          description: >-
            When true, exclude LLM executions before pagination and
            total_billed. Defaults to false (all executions). The execution kind
            is retained after content expires.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Generation history, newest first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubGenerationListDto'
              example:
                data: []
                next_cursor: MTc1NzIzNDAwMDAwMDAwMDA6MDE5MmYzYTQ
                total_billed: 1.2345
        '400':
          description: Invalid input
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - invalid_input
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
              example:
                type: https://fanifyai.com/docs/hub/errors#invalid_input
                title: Invalid input
                status: 400
                code: invalid_input
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - unauthorized
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
              example:
                type: https://fanifyai.com/docs/hub/errors#unauthorized
                title: Unauthorized
                status: 401
                code: unauthorized
        '429':
          description: Rate limit reached
          headers:
            Retry-After:
              description: Seconds before retrying.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - rate_limited
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
              example:
                type: https://fanifyai.com/docs/hub/errors#rate_limited
                title: Rate limit reached
                status: 429
                code: rate_limited
      security:
        - Bearer: []
components:
  schemas:
    HubGenerationListDto:
      required:
        - data
        - next_cursor
        - total_billed
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/HubGenerationDto'
        next_cursor:
          type: string
          nullable: true
        total_billed:
          type: number
          format: double
          nullable: true
      additionalProperties: false
    HubGenerationDto:
      required:
        - billed_cost
        - completed_at
        - created_at
        - currency
        - error
        - estimated_cost
        - id
        - input
        - is_llm
        - missing
        - model
        - outputs
        - started_at
        - status
      type: object
      properties:
        id:
          type: string
          format: uuid
        model:
          type: string
        is_llm:
          type: boolean
        status:
          enum:
            - queued
            - running
            - succeeded
            - failed
            - canceled
            - awaiting_supply
          type: string
        input:
          type: object
          nullable: true
        estimated_cost:
          type: number
          format: double
        billed_cost:
          type: number
          format: double
          nullable: true
        currency:
          enum:
            - EUR
          type: string
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/HubOutputDto'
        error:
          allOf:
            - $ref: '#/components/schemas/HubErrorDto'
          nullable: true
        missing:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    HubOutputDto:
      required:
        - index
      type: object
      properties:
        index:
          type: integer
          format: int32
        media_type:
          type: string
          nullable: true
        url:
          type: string
          nullable: true
        size:
          type: integer
          format: int64
          nullable: true
        expires_at:
          type: string
          format: date-time
          nullable: true
        data:
          type: object
          nullable: true
      additionalProperties: false
    HubErrorDto:
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: http
      description: Fanify API key.
      scheme: bearer
      bearerFormat: fanify_sk_...

````

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