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

# Get build status

> Check whether a template version's golden snapshot is ready.

Returns the current build state of a version. Poll this after [Build template](/api-reference/templates/build) until `status` is `ready` or `failed`. Reading status is not plan-gated.

A curated ref resolves too: pass the `system` namespace, e.g. `system/coding/1.0.3`, to read the build state of a curated template.

## Path parameters

<ParamField path="namespace" type="string" required>Template namespace.</ParamField>
<ParamField path="name" type="string" required>Template name.</ParamField>
<ParamField path="version" type="string" required>Version (semver).</ParamField>

## Response

<ResponseField name="status" type="string">
  One of:

  * `not_built`: no golden snapshot yet, or the last queued build was cancelled. Call [Build template](/api-reference/templates/build).
  * `building`: a build is queued or running.
  * `ready`: built and launchable.
  * `failed`: the last build failed. See `error`.
</ResponseField>

<ResponseField name="ref" type="string">Template ref.</ResponseField>
<ResponseField name="digest" type="string">Content-addressed digest.</ResponseField>
<ResponseField name="build_time_ms" type="integer">Build duration in milliseconds. Present once a queued build has finished.</ResponseField>
<ResponseField name="error" type="string">Failure reason. Present when `status` is `failed`.</ResponseField>

The fields below are present when the version was built through the build queue, which is how [Build template](/api-reference/templates/build) builds your own templates. They are absent for curated templates and for versions built before the queue.

<ResponseField name="job_id" type="string">ID of the newest build job for this version.</ResponseField>
<ResponseField name="phase" type="string">Job phase. `queued` while waiting for a runner, `retrying` while waiting after a failed attempt.</ResponseField>
<ResponseField name="attempts" type="integer">How many times a runner has attempted the job.</ResponseField>
<ResponseField name="queued_at" type="string">ISO 8601 timestamp of when the job was queued.</ResponseField>
<ResponseField name="finished_at" type="string">ISO 8601 timestamp of when the job finished, or `null` while it is in flight.</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build \
    -H "Authorization: Bearer $ORGO_API_KEY"
  ```

  ```python Python theme={null}
  import os, requests

  r = requests.get(
      "https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build",
      headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
  )
  print(r.json()["status"])
  ```

  ```javascript JavaScript theme={null}
  const r = await fetch(
    "https://www.orgo.ai/api/templates/default/claude-code/1.0.0/build",
    { headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}` } },
  );
  console.log((await r.json()).status);
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "ref": "default/claude-code@1.0.0",
  "digest": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
  "status": "ready",
  "build_time_ms": 118420,
  "job_id": "9f1c2d3e-4b5a-4c6d-8e7f-0a1b2c3d4e5f",
  "phase": "done",
  "attempts": 1,
  "queued_at": "2026-06-08T16:58:00Z",
  "finished_at": "2026-06-08T17:00:02Z"
}
```

## Errors

| Status | Body | Meaning |
| - | - | - |
| `400` | `{ "error": string }` | The path does not form a valid `namespace/name@version` ref. The message starts with `invalid`. |
| `401` | `{ "error": "Invalid API key" }` | The Bearer token starts with `sk_` but is not a known Orgo key. |
| `401` | `{ "error": "Authentication required" }` | No `Authorization` header, or a Bearer token that is not an `sk_` key. |
| `401` | `{ "error": "This endpoint requires an account-wide credential (workspace_scope_mismatch)." }` | The key is workspace-scoped. Template endpoints need an account-wide key. This route answers with `401`, not `403`. |
| `401` | `{ "error": "Service temporarily unavailable. …" }` | Orgo could not verify the key because of a server-side fault. The key is fine. Retry. |
| `404` | `{ "error": string }` | No such template version is published, in your namespaces or, for a `system` ref, among curated templates. |
| `500` | `{ "error": string }` | Unexpected server error (`"internal error"`), or the template registry host failed or timed out. Retry. |
| `503` | `{ "error": string }` | No fleet host is available to serve the template registry. Retry. |


## OpenAPI

````yaml GET /templates/{namespace}/{name}/{version}/build
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: spencer@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: >-
      Account capacity: how many computers an account may run, and adding or
      giving back more.
  - name: Clients
    description: >-
      Run Orgo for your clients from your own app: a workspace and scoped key
      each, billed to you or to them.
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Screens
    description: >-
      More than one desktop on a single computer. Each screen is its own X
      server with its own cursor and window manager, so an agent working on one
      cannot disturb another.
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
paths:
  /templates/{namespace}/{name}/{version}/build:
    get:
      tags:
        - Templates
      summary: Get build status
      description: >-
        Returns the current build state of a version. Poll until `status` is
        `ready` or `failed`. Not plan-gated. Pass the `system` namespace to read
        a curated template's state.
      operationId: getBuildStatus
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            type: string
        - name: name
          in: path
          required: true
          schema:
            type: string
        - name: version
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Build status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildResult'
              example:
                ref: default/claude-code@1.0.0
                digest: >-
                  a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2
                status: ready
                build_time_ms: 118420
                job_id: 9f1c2d3e-4b5a-4c6d-8e7f-0a1b2c3d4e5f
                phase: done
                attempts: 1
                queued_at: '2026-06-08T16:58:00Z'
                finished_at: '2026-06-08T17:00:02Z'
        '400':
          description: >-
            The path does not form a valid `namespace/name@version` ref. The
            message starts with `invalid`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateError'
              examples:
                ref:
                  summary: Not a namespace/name@version ref
                  value:
                    error: >-
                      invalid ref "default/Claude_Code@1.0.0". Want
                      namespace/name@version
                version:
                  summary: A version the registry does not accept
                  value:
                    error: invalid version "1.0.0-RC1"
        '401':
          $ref: '#/components/responses/UnauthorizedTemplates'
        '404':
          description: >-
            No such template version is published, in your namespaces or, for a
            `system` ref, among curated templates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateError'
              example:
                error: not found
        '500':
          $ref: '#/components/responses/TemplateInternalError'
        '503':
          $ref: '#/components/responses/TemplateHostUnavailable'
components:
  schemas:
    BuildResult:
      type: object
      properties:
        ref:
          type: string
        digest:
          type: string
          description: Content-addressed digest.
        status:
          type: string
          enum:
            - ready
            - building
            - failed
            - not_built
          description: >-
            `not_built`: no golden snapshot yet, or the last queued build was
            cancelled. `building`: queued or running. `ready`: launchable.
            `failed`: see `error`.
        build_time_ms:
          type: integer
          description: >-
            Build duration in milliseconds. Present once a queued build has
            finished.
        error:
          type: string
          description: Failure reason. Present when `status` is `failed`.
        job_id:
          type: string
          description: >-
            ID of the newest build job for this version. Present for versions
            built through the build queue only, as are the fields below.
        phase:
          type: string
          description: >-
            Job phase. `queued` while waiting for a runner, `retrying` while
            waiting after a failed attempt.
        attempts:
          type: integer
          description: How many times a runner has attempted the job.
        queued_at:
          type: string
          format: date-time
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
          description: '`null` while the job is in flight.'
    TemplateError:
      type: object
      description: >-
        A failure from the template registry, relayed with the registry's own
        status and code.
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
          description: Machine-readable reason, when the registry supplied one.
        details:
          description: >-
            Per-field validation errors, or the raw upstream body when it was
            not JSON.
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/ValidationError'
            - type: string
    ValidationError:
      type: object
      properties:
        field:
          type: string
          description: Dotted path to the offending field.
          example: hardware.cpu
        code:
          type: string
          example: invalid_enum
        message:
          type: string
        hint:
          type: string
    Error:
      type: object
      description: >-
        The base error body. Every failure carries `error`; individual endpoints
        add the fields named in the schemas below.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable message.
          example: Access denied
        code:
          type: string
          description: >-
            Machine-readable reason. Present on the failures that define one,
            absent otherwise.
  responses:
    UnauthorizedTemplates:
      description: >-
        No usable credential, or a workspace-scoped key. Template endpoints need
        an account-wide key and answer a scoped one with `401`, not `403`. A
        server-side fault while verifying the credential also returns `401`,
        with a `Service temporarily unavailable` message. Retry that one; the
        key is fine.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid-key:
              summary: The key is not one of yours
              value:
                error: Invalid API key
            no-credential:
              summary: No key and no session
              value:
                error: Authentication required
            account-wide-required:
              summary: The API key is workspace-scoped
              value:
                error: >-
                  This endpoint requires an account-wide credential
                  (workspace_scope_mismatch).
            service-unavailable:
              summary: Server-side fault while verifying the credential. Retry.
              value:
                error: >-
                  Service temporarily unavailable. The database is not accepting
                  requests. Retry shortly.
    TemplateInternalError:
      description: >-
        Unexpected server error (`internal error`), or the template registry
        host failed or timed out, with the underlying message in `error`. Retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TemplateError'
          examples:
            internal:
              summary: Unexpected server error
              value:
                error: internal error
            timeout:
              summary: The registry host did not answer in time
              value:
                error: timeout of 30000ms exceeded
    TemplateHostUnavailable:
      description: >-
        No template-capable host in the fleet could serve the request, or the
        fleet lookup itself failed. Retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TemplateError'
          example:
            error: >-
              no template launch host available in env=production: every
              fleet_servers row was excluded (disabled, draining, unhealthy,
              dedicated, legacy/parked, or not accepting user VMs). Check the
              fleet
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````

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