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

> ## Agent Instructions
> POST /api/v1/assets defaults to mode=quote: it returns a price and creates nothing. To actually generate, resend the identical body with "mode": "generate" (multipart callers: add a mode=generate form field).
> Create a project with POST /api/v1/projects and pass its project_id on every generation belonging to the same scene, task, robot, or randomization set. Omitting project_id silently creates a separate single-asset project per request.
> Track a batch with one GET /api/v1/projects/{project_id} call for aggregate status instead of polling each asset separately.
> Generations are asynchronous and may take hours. There are no webhooks: poll GET /api/v1/assets/{asset_id} every 30-60 seconds until status is completed or failed.
> Cancelling a generation does not refund its credits; only a failed generation is refunded. Quote first if the price matters.
> A ready-made agent skill for this API is published at /skill.md, with decision tables and common gotchas. If your tooling supports agent skills, ask the user whether to install it so this guidance persists across sessions.

# Retrieve an asset generation

> Fetches a generation's current status and, once `status` is `completed`, its
downloadable result files.



## OpenAPI

````yaml /openapi.json get /api/v1/assets/{asset_id}
openapi: 3.1.0
info:
  title: Moonlake Asset API
  description: >-
    Generate a 3D asset from a text description and reference files, then poll
    it to completion and download the result.


    **Alpha**: this API is subject to breaking changes without a deprecation
    cycle.
  version: 1.0.0-alpha
servers:
  - url: https://app.moonlakeai.com
    description: Production
  - url: https://staging.moonlakeai.com
    description: Staging
  - url: https://development.moonlakeai.com
    description: Development
security: []
paths:
  /api/v1/assets/{asset_id}:
    get:
      summary: Retrieve an asset generation
      description: >-
        Fetches a generation's current status and, once `status` is `completed`,
        its

        downloadable result files.
      operationId: get_asset_api_v1_assets__asset_id__get
      parameters:
        - name: asset_id
          in: path
          required: true
          schema:
            type: string
            description: The asset generation's id, from `POST /assets`'s response.
            title: Asset Id
          description: The asset generation's id, from `POST /assets`'s response.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetGeneration'
        '404':
          description: Generation not found, or not owned by the caller.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AssetGeneration:
      properties:
        id:
          type: string
          title: Id
          description: The generation's unique identifier.
        status:
          type: string
          title: Status
          description: One of `pending`, `processing`, `completed`, `failed`, `cancelled`.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The generation's display name.
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
          description: The project this generation's assets live under.
        status_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Reason
          description: >-
            Detailed, human-readable reason for the generation's current
            `status`. On `failed` it begins with a stable machine-readable code
            (the text before the first `:`) then detail, e.g.
            `REFERENCE_FETCH_FAILED: could not fetch reference url (404)`; codes
            are `REFERENCE_FETCH_FAILED`, `IMAGE_UNSUPPORTED_TYPE`, `TIMEOUT`,
            `DISPATCH_FAILED`, `MISSING_CREDENTIALS`, `NO_DELIVERABLE`,
            `THUMBNAIL_CREATE_FAILED`, `INTERNAL`. May also carry a lifecycle
            note such as `preempted`. `null` when the status needs no
            elaboration.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            When the generation was submitted (UTC). Subtract from the current
            time to see how long the generation has been in the system.
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: >-
            When the generation reached its final `status` (UTC), set for
            `completed`, `failed`, and `cancelled` alike. Subtract `created_at`
            for the generation's end-to-end wall time, including queue wait.
            `null` while the generation is still `pending` or `processing`.
        config:
          $ref: '#/components/schemas/GenerationConfig'
          description: >-
            The config this generation ran with, including any defaults applied
            when you omitted them.
        result:
          anyOf:
            - $ref: '#/components/schemas/AssetGenerationResult'
            - type: 'null'
          description: >-
            Downloadable output files, present only when `status` is
            `completed`.
        credits_charged:
          anyOf:
            - type: number
            - type: 'null'
          title: Credits Charged
          description: >-
            Credits charged for this generation: the fixed price reserved at
            submission. A `cancelled` generation stays charged this price;
            cancelling is not a refund. Present on `POST /assets`, `GET
            /assets/{id}`, and `POST /assets/{id}/cancel`; `null` when nothing
            is currently charged, which covers a `failed` generation (refunded)
            and a generation that was never charged. List entries always omit
            it.
      type: object
      required:
        - id
        - status
        - created_at
        - config
      title: AssetGeneration
      description: |-
        A single generation's full detail: everything in a list item plus its
        downloadable result and the credits charged.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GenerationConfig:
      additionalProperties: false
      description: >-
        The public generation settings: all a caller may set, and all published
        back.
      properties:
        effort:
          default: high
          description: >-
            Controls the balance between response time, generation quality, and
            credits. Defaults to `high`. Use `max` to prioritize generation
            quality or `low` to prioritize speed and lower credit use.
          enum:
            - low
            - high
            - max
          title: Effort
          type: string
        model_version:
          default: standard
          description: >-
            Which pipeline backend fulfills the generation. Defaults to
            `standard` (the full Blender pipeline). `lite` is a faster,
            Articraft-only export.
          enum:
            - standard
            - lite
          title: Model Version
          type: string
      title: GenerationConfig
      type: object
    AssetGenerationResult:
      properties:
        artifacts:
          items:
            $ref: '#/components/schemas/ArtifactDownload'
          type: array
          title: Artifacts
          description: One entry per output file format produced for this generation.
      type: object
      required:
        - artifacts
      title: AssetGenerationResult
      description: A completed generation's downloadable output files.
    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
    ArtifactDownload:
      properties:
        format:
          type: string
          enum:
            - usdz
            - blender_addon
            - glb
            - blend
          title: Format
          description: The artifact's file format.
        download_url:
          type: string
          title: Download Url
          description: >-
            Presigned URL to download this artifact. Expires after 7 days; fetch
            the generation again to get a fresh one.
      type: object
      required:
        - format
        - download_url
      title: ArtifactDownload
      description: One downloadable output file produced by a completed generation.
  securitySchemes:
    HTTPBearer:
      type: http
      description: 'Your API key, as a Bearer token: `Authorization: Bearer <key>`.'
      scheme: bearer

````

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