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

# Download a completed output

> Checks ownership and completion, then redirects to a signed download URL valid for 15 minutes. Use the download_url from the execution. Never forward the API Authorization header to the redirect destination. Returns PNG for images or ZIP for sprites.



## OpenAPI

````yaml /openapi/managed.yaml get /v1/image-jobs/{job_id}/asset
openapi: 3.1.0
info:
  title: DreamLayer Managed Image API
  version: '1'
  description: >-
    Generate or edit images, follow durable executions, and retrieve owned
    outputs. Start with https://docs.dreamlayer.io/agent-api for authentication,
    limits, runnable examples, event recovery, and billing. Sprite sheets
    require account capability support and an approved credit ceiling.
servers:
  - url: https://api.dreamlayer.io
security:
  - bearerAuth: []
paths:
  /v1/image-jobs/{job_id}/asset:
    get:
      summary: Download a completed output
      description: >-
        Checks ownership and completion, then redirects to a signed download URL
        valid for 15 minutes. Use the download_url from the execution. Never
        forward the API Authorization header to the redirect destination.
        Returns PNG for images or ZIP for sprites.
      operationId: downloadImageAsset
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Completed output bytes when served directly
          content:
            image/png:
              schema:
                type: string
                format: binary
            application/zip:
              schema:
                type: string
                format: binary
        '302':
          description: Signed download location
          headers:
            Location:
              required: true
              schema:
                type: string
                format: uri
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/InvalidRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/TemporaryFailure'
components:
  responses:
    Unauthenticated:
      description: >-
        Invalid or revoked API key. A missing Authorization header returns 422
        invalid_request.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Owned resource not found
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    InvalidRequest:
      description: Invalid request, including a missing required Authorization header
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: >-
        Synchronous request or open-stream limit reached. See
        https://docs.dreamlayer.io/agent-api/limits for scopes and backoff.
        Retry-After and remaining-request headers are not guaranteed.
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: RATE_LIMITED
              reason: rate_limited
              message: Too many requests. Please try again shortly.
              category: RATE_LIMITED
              retryable: true
              request_id: d34db33f-0000-4000-8000-000000000001
    TemporaryFailure:
      description: Retryable service failure
      headers:
        Cache-Control:
          schema:
            type: string
            const: no-store
        Pragma:
          schema:
            type: string
            const: no-cache
        X-Request-ID:
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    ErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - reason
            - message
            - category
            - retryable
            - request_id
          properties:
            code:
              type: string
              description: Legacy uppercase code retained for existing clients.
            reason:
              $ref: '#/components/schemas/PublicErrorReason'
            message:
              type: string
            category:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
              format: uuid
            details:
              type: object
              description: >-
                Optional sanitized validation detail. Submitted values are never
                echoed.
              additionalProperties: true
    PublicErrorReason:
      type: string
      enum:
        - invalid_request
        - authentication_failed
        - access_denied
        - resource_not_found
        - insufficient_credits
        - conflict
        - too_many_active_jobs
        - rate_limited
        - quota_exceeded
        - content_refused
        - temporarily_unavailable
        - generation_failed
        - insufficient_frames
        - prompt_policy_blocked
        - feature_unavailable
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````