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

# Get workflow run

> Get the status and results of a workflow run.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspaces/{workspace_id}/workflows/{workflow_id}/runs/{run_id}
openapi: 3.1.0
info:
  title: Layer REST API
  description: >
    REST API for AI-powered game asset creation on the Layer platform.


    ## Authentication


    All endpoints require a Bearer token in the `Authorization` header:


    ```

    Authorization: Bearer <token>

    ```


    ### Personal Access Tokens (recommended)


    The simplest way to authenticate is with a Personal Access Token (PAT):


    1. Log in to [app.layer.ai](https://app.layer.ai)

    2. Go to **Settings > Personal Access Tokens**

    3. Click **Create Token**, give it a name, and copy the token value

    4. Pass it as `Authorization: Bearer <your-pat-token>`


    PATs are long-lived and ideal for scripts, CI pipelines, and partner
    integrations.


    ### OAuth2 (browser-based)


    For browser-based applications, use the Auth0 OAuth2 flow. Redirect users to

    the Layer login page, exchange the authorization code for a JWT access
    token,

    and use it as `Authorization: Bearer <jwt>`.


    ## Creative Units


    Generations consume Creative Units (CUs). Use the estimate endpoints to
    check

    cost before executing. Check workspace balance via `GET
    /v1/workspaces/{id}`.


    ## Pagination


    List endpoints support cursor-based pagination via `limit` and `cursor`
    query

    parameters. Responses include a `pagination` object with `next_cursor`,

    `has_more_results`, and `total_count`. Cursors are opaque — do not parse or

    construct them.


    ## Errors


    All errors return [RFC 7807 Problem
    Details](https://tools.ietf.org/html/rfc7807):


    ```json

    {
      "type": "https://api.layer.ai/errors/ERROR_CODE",
      "title": "Human-readable title",
      "status": 404,
      "detail": "Detailed description of what went wrong."
    }

    ```


    Common status codes: `401` (unauthenticated), `402` (insufficient balance),

    `403` (forbidden), `404` (not found), `422` (invalid input), `429` (rate
    limited).
  version: 1.0.0
servers:
  - url: https://api.app.layer.ai/api
    description: Production
  - url: /backend/rest
    description: Local development
security: []
paths:
  /v1/workspaces/{workspace_id}/workflows/{workflow_id}/runs/{run_id}:
    get:
      tags:
        - Workflows
      summary: Get workflow run
      description: Get the status and results of a workflow run.
      operationId: getWorkflowRun
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workflow Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkflowRunOutput'
        '401':
          description: Unauthenticated — missing or invalid Bearer token.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '402':
          description: Insufficient Creative Units balance.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '403':
          description: Forbidden — insufficient permissions.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '404':
          description: Resource not found.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '422':
          description: Invalid input parameters.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '429':
          description: Rate limited — too many concurrent requests.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
      security:
        - HTTPBearer: []
components:
  schemas:
    GetWorkflowRunOutput:
      properties:
        run_id:
          type: string
          format: uuid
          title: Run Id
          description: Unique identifier for this workflow run.
        status:
          $ref: '#/components/schemas/BlueprintRunStatus'
          description: 'Current status: pending, running, success, failure, or cancelled.'
        poll_interval_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Poll Interval Seconds
          description: >-
            Suggested polling interval in seconds. Present while PENDING or
            RUNNING.
        steps:
          items:
            $ref: '#/components/schemas/GetWorkflowRunStep'
          type: array
          title: Steps
          description: Status of each step composing the workflow run.
          default: []
        estimated_price_creative_units:
          anyOf:
            - type: number
            - type: 'null'
          title: Estimated Price Creative Units
          description: Estimated Creative Units price. Present when available.
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: Completion timestamp. Present only on SUCCESS.
        actual_price_creative_units:
          anyOf:
            - type: number
            - type: 'null'
          title: Actual Price Creative Units
          description: Actual Creative Units price charged. Present only on SUCCESS.
        outputs:
          anyOf:
            - items:
                $ref: '#/components/schemas/WorkflowRunAsset'
              type: array
            - type: 'null'
          title: Outputs
          description: Generated assets. Present only on SUCCESS.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message. Present only on FAILURE.
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Machine-readable error code. Present only on FAILURE.
      type: object
      required:
        - run_id
        - status
      title: GetWorkflowRunOutput
    BlueprintRunStatus:
      type: string
      enum:
        - pending
        - running
        - success
        - failure
        - cancelled
      title: BlueprintRunStatus
      description: Enum representing the status of a blueprint run.
    GetWorkflowRunStep:
      properties:
        name:
          type: string
          title: Name
          description: The name of the workflow step
        status:
          $ref: '#/components/schemas/BlueprintRunStatus'
          description: >-
            The execution status of the step: pending, running, success,
            failure, or cancelled.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: The error details if any
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Machine-readable error code if the step failed.
      type: object
      required:
        - name
        - status
      title: GetWorkflowRunStep
    WorkflowRunAsset:
      properties:
        object_id:
          type: string
          format: uuid
          title: Object Id
          description: Unique identifier of the generated object.
        object_type:
          $ref: '#/components/schemas/LibraryObjectType'
          description: 'Type of generated object: file or asset.'
        file_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: File Id
          description: >-
            File ID — pass directly as input to forge or workflow runs without
            re-uploading.
        url:
          type: string
          title: Url
          description: Download URL for the asset.
        content_type:
          type: string
          title: Content Type
          description: MIME type, e.g. image/png or video/mp4.
        preview_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Preview Url
          description: Image preview URL.
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
          description: Width in pixels.
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
          description: Height in pixels.
        duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration Seconds
          description: Duration in seconds for video assets.
        file_size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: File Size Bytes
          description: File size in bytes.
      type: object
      required:
        - object_id
        - object_type
        - url
        - content_type
      title: WorkflowRunAsset
    LibraryObjectType:
      type: string
      enum:
        - directory
        - file
        - asset
        - style
        - blueprint
      title: LibraryObjectType
  securitySchemes:
    HTTPBearer:
      type: http
      description: >-
        Personal Access Token or OAuth2 JWT. Create a PAT at app.layer.ai →
        Settings → Personal Access Tokens.
      scheme: bearer

````