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

# Poll a generation

> `queued` → `processing` → `succeeded` | `failed`.

On success `output[]` carries the assets with resolved media URLs. Those URLs are
**time-limited** for stored objects — download the bytes rather than caching the link.
On failure, `error` explains why and the credits have already been refunded.

Poll every few seconds; a photo takes ~30s, a video several minutes.



## OpenAPI

````yaml /openapi.json get /v1/generations/{id}
openapi: 3.1.0
info:
  title: Creatorline API
  version: 1.0.0
  description: >-
    Generate AI influencer photos and videos, and publish them to your creators'
    social

    accounts — from your own backend, your scripts, or a coding agent.


    Every request authenticates with an organization-scoped API key and is
    charged against

    that organization's credits, at the same prices the studio shows.
servers:
  - url: https://api.creatorline.io
    description: Production
  - url: http://localhost:3000/api
    description: Local development (the same routes, under the app's own /api prefix)
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Account
    description: Who the key belongs to, and what it can spend.
  - name: Catalog
    description: The live tool and model catalog. Read it, do not hardcode it.
  - name: Creators
    description: The AI creators a generation or post belongs to.
  - name: Generations
    description: Start, price and poll image and video runs.
  - name: Assets
    description: The media library, and uploading your own files.
  - name: Posts
    description: Turn media into a post and publish it to social platforms.
  - name: Credits
    description: Balance and the consumption ledger.
paths:
  /v1/generations/{id}:
    get:
      tags:
        - Generations
      summary: Poll a generation
      description: >-
        `queued` → `processing` → `succeeded` | `failed`.


        On success `output[]` carries the assets with resolved media URLs. Those
        URLs are

        **time-limited** for stored objects — download the bytes rather than
        caching the link.

        On failure, `error` explains why and the credits have already been
        refunded.


        Poll every few seconds; a photo takes ~30s, a video several minutes.
      operationId: getGeneration
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The generation.
          headers:
            x-request-id:
              description: >-
                Correlation id for this request. Quote it in any support
                question.
              schema:
                type: string
            x-ratelimit-limit:
              description: Requests allowed per minute.
              schema:
                type: integer
            x-ratelimit-remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            x-ratelimit-reset:
              description: Unix seconds when the window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generation'
              example:
                object: generation
                id: 3f6c1a2b-8d4e-4c11-9a77-2b8f0e5d1c93
                status: succeeded
                tool: ugc-video
                model: bytedance-seedance-2-0-reference-to-video-fast
                output:
                  - object: asset
                    id: 9b2f7c10-4f3a-4a2b-9f10-77c3d2e1a8b4
                    file_type: video
                    ratio: '9:16'
                    duration_sec: 5
                    url: https://cdn.creatorline.io/media/9b2f7c10/clip.mp4
        '401':
          description: Missing, malformed, revoked or expired key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: authentication_error
                  code: invalid_api_key
                  message: Missing or invalid API key.
                request_id: req_8fQ2mRxK1pLd
        '404':
          description: No such resource — including one that belongs to another workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  type: not_found_error
                  code: resource_missing
                  message: No such generation.
                request_id: req_8fQ2mRxK1pLd
components:
  schemas:
    Generation:
      type: object
      properties:
        object:
          type: string
          enum:
            - generation
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - queued
            - processing
            - succeeded
            - failed
        tool:
          type: string
        stage:
          type: string
        model:
          type: string
        prompt:
          type: string
        params:
          type: object
          additionalProperties: true
        account_id:
          type: string
          format: uuid
        error:
          type: string
          description: Present on `failed`. The credits were refunded.
        created_at:
          type: number
        updated_at:
          type: number
        output:
          type: array
          items:
            $ref: '#/components/schemas/Asset'
      required:
        - object
        - id
        - status
        - output
    Error:
      type: object
      description: >-
        Every failure has this shape. `param` names the offending field when
        there is one.
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - not_found_error
                - rate_limit_error
                - insufficient_credits_error
                - api_error
            code:
              type: string
            message:
              type: string
            param:
              type: string
          required:
            - type
            - code
            - message
        request_id:
          type: string
        required_credits:
          type: number
          description: 402 only.
        credit_balance:
          type: number
          description: 402 only.
      required:
        - error
        - request_id
    Asset:
      type: object
      properties:
        object:
          type: string
          enum:
            - asset
        id:
          type: string
          format: uuid
        type:
          type: string
        file_type:
          type: string
          enum:
            - image
            - video
            - audio
        title:
          type: string
        ratio:
          type: string
        duration_sec:
          type: number
        url:
          type: string
          format: uri
          description: >-
            Fetchable media URL. TIME-LIMITED for stored objects — download, do
            not cache.
        thumbnail_url:
          type: string
          format: uri
        mime_type:
          type: string
        size_bytes:
          type: number
        source:
          type: string
        status:
          type: string
        tool:
          type: string
        account_id:
          type: string
          format: uuid
      required:
        - object
        - id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your organization's API key, from Settings → API. `Authorization: Bearer
        crl_sk_live_…`
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Alternative to the Authorization header, for tooling that prefers it.

````

## Related topics

- [Start a generation](/api-reference/generations/start-a-generation.md)
- [Generating media](/generations.md)
- [MCP server](/mcp.md)
- [Creatorline API](/index.md)
- [List generations](/api-reference/generations/list-generations.md)
