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

# Depth to RGB

> Generate an RGB panorama from a depth panorama.

Provide a depth panorama and a text prompt
describing the desired appearance. The depth map
supplies the scene geometry; the model synthesizes
textures that match that geometry and returns a
panoramic RGB image.

Accepted depth inputs:

* **EXR**: float depth values. Omit
  ``z_min`` and ``z_max``.
* **PNG**: depth values normalized to [0, 1].
  Provide both ``z_min`` and ``z_max`` so the
  service can decode the PNG correctly.

For a complete PNG-based workflow, see the
[web-chisel-depth-png example](https://github.com/worldlabsai/worldlabs-api-examples/tree/main/web-chisel-depth-png).

Returns a long-running ``Operation``. Poll
``GET /operations/{operation_id}`` until
``done`` is ``true``, then read the generated
panorama URL from ``response.pano_url``.

Raises:
    HTTPException: 400 if invalid request
    HTTPException: 402 if insufficient credits
    HTTPException: 500 if generation could not start

<Note>
  `depth_pano_image` must be a full 360° equirectangular depth panorama with a
  2:1 width-to-height aspect ratio. Inputs that are not 2:1 are center-cropped to
  that ratio before generation, which discards content at the edges.
</Note>


## OpenAPI

````yaml POST /marble/v1/pano:depth_to_rgb
openapi: 3.1.0
info:
  description: Public-facing API for the Marble platform
  summary: Marble Public API v1
  title: Marble Public API v1
  version: 1.0.0
servers:
  - description: World API
    url: https://api.worldlabs.ai
security:
  - ApiKeyAuth: []
paths:
  /marble/v1/pano:depth_to_rgb:
    post:
      summary: Pano Depth To Rgb
      description: >-
        Generate an RGB panorama from a depth panorama.


        Provide a depth panorama and a text prompt

        describing the desired appearance. The depth map

        supplies the scene geometry; the model synthesizes

        textures that match that geometry and returns a

        panoramic RGB image.


        Accepted depth inputs:


        * **EXR**: float depth values. Omit
          ``z_min`` and ``z_max``.
        * **PNG**: depth values normalized to [0, 1].
          Provide both ``z_min`` and ``z_max`` so the
          service can decode the PNG correctly.

        For a complete PNG-based workflow, see the

        [web-chisel-depth-png
        example](https://github.com/worldlabsai/worldlabs-api-examples/tree/main/web-chisel-depth-png).


        Returns a long-running ``Operation``. Poll

        ``GET /operations/{operation_id}`` until

        ``done`` is ``true``, then read the generated

        panorama URL from ``response.pano_url``.


        Raises:
            HTTPException: 400 if invalid request
            HTTPException: 402 if insufficient credits
            HTTPException: 500 if generation could not start
      operationId: pano_depth_to_rgb_marble_v1_pano_depth_to_rgb_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PanoDepthToRgbRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation_PanoDepthToRgbResult_'
          description: Successful Response
        '402':
          content:
            application/json:
              example:
                detail: >-
                  Insufficient API credits to start this request. Add credits or
                  enable auto-refill at https://platform.worldlabs.ai/billing.
          description: The account has insufficient API credits for this request.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    PanoDepthToRgbRequest:
      description: >-
        Request to generate an RGB panorama from a depth panorama.


        Provide a depth panorama and a text prompt describing

        the desired appearance. The depth map supplies the

        scene geometry; the model synthesizes textures that

        loosely adhere to that geometry and returns a panoramic RGB image.


        Accepted depth inputs:


        * **EXR**: float depth values. Omit ``z_min``
          and ``z_max``.
        * **PNG**: depth values normalized to [0, 1].
          Provide both ``z_min`` and ``z_max`` so the service
          can decode the PNG correctly.

        For a complete PNG-based workflow, see the

        `web-chisel-depth-png example
        <https://github.com/worldlabsai/worldlabs-api-examples/tree/main/web-chisel-depth-png>`.


        This endpoint returns a long-running ``Operation``.

        Poll ``GET /operations/{operation_id}`` until

        ``done`` is ``true``, then read the generated

        panorama URL from ``response.pano_url``.
      examples:
        - depth_pano_image:
            source: uri
            uri: https://example.com/depth.exr
          text_prompt: >-
            The scene is a warm, rustic cabin interior with a realistic style
            and a cozy winter atmosphere. Wooden walls and exposed beams frame
            the room, while a stone fireplace casts soft amber light across
            simple furnishings and natural textures. The 360 scene is faultless.
        - depth_pano_image:
            source: uri
            uri: https://example.com/greenhouse-depth.exr
          text_prompt: >-
            A peaceful greenhouse workshop filled with plants and glassware,
            with soft sunlight, weathered wood, and ivy creeping along the
            walls.
        - depth_pano_image:
            source: uri
            uri: https://example.com/depth.png
          text_prompt: >-
            The scene is a warm Mediterranean kitchen rendered in a realistic
            style with a bright, welcoming coastal atmosphere. The overall tone
            is relaxed and sunlit, combining natural materials with crisp
            handcrafted details. Blue ceramic tiles wrap the backsplash and
            continue across key architectural surfaces, giving the room a cool
            accent against creamy plaster walls. Wooden cabinetry lines the
            perimeter in a balanced arrangement, with paneled doors, open
            shelving, and brass hardware contributing to the room's refined but
            lived-in character. A broad countertop of pale stone runs between
            the cabinets, creating a continuous work surface that anchors the
            cooking area. A central table with a solid wood top occupies the
            middle of the room, surrounded by simple chairs and small ceramic
            vessels that reinforce the artisanal style. Arched openings connect
            the kitchen to adjacent areas, while French doors admit generous
            daylight and suggest an outdoor terrace nearby. Terracotta accents,
            woven textures, and neatly arranged cookware add visual richness
            without cluttering the space. The cabinetry, tiled surfaces, and
            stone counters form a coherent ring around the room, while the table
            remains the central focal element within the composition. The 360
            scene is faultless.
          z_max: 100
          z_min: 0.1
      properties:
        depth_pano_image:
          description: >-
            Depth panorama image (EXR or PNG). Provide via URI, media_asset, or
            base64 (max 100 MB).
          discriminator:
            mapping:
              data_base64:
                $ref: '#/components/schemas/DataBase64Reference'
              media_asset:
                $ref: '#/components/schemas/MediaAssetReference'
              uri:
                $ref: '#/components/schemas/UriReference'
            propertyName: source
          oneOf:
            - $ref: '#/components/schemas/MediaAssetReference'
            - $ref: '#/components/schemas/UriReference'
            - $ref: '#/components/schemas/DataBase64Reference'
          title: Depth Pano Image
        seed:
          anyOf:
            - maximum: 4294967295
              minimum: 0
              type: integer
            - type: 'null'
          description: Random seed for reproducible generation.
          title: Seed
        text_prompt:
          description: Text description of the desired appearance.
          title: Text Prompt
          type: string
        z_max:
          anyOf:
            - exclusiveMinimum: 0
              type: number
            - type: 'null'
          description: >-
            Maximum depth. Required for PNG depth maps (normalized to [0, 1]).
            Must be provided together with z_min and must be greater than z_min.
            Omit for EXR depth maps.
          title: Z Max
        z_min:
          anyOf:
            - exclusiveMinimum: 0
              type: number
            - type: 'null'
          description: >-
            Minimum depth. Required for PNG depth maps (normalized to [0, 1]).
            Must be provided together with z_max. Omit for EXR depth maps.
          title: Z Min
      required:
        - depth_pano_image
        - text_prompt
      title: PanoDepthToRgbRequest
      type: object
    Operation_PanoDepthToRgbResult_:
      properties:
        cost:
          anyOf:
            - $ref: '#/components/schemas/OperationCost'
            - type: 'null'
          description: >-
            Settled credit cost for the operation. Populated only on successful
            completion.
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Creation timestamp
          title: Created At
        done:
          description: True if the operation is completed
          title: Done
          type: boolean
        error:
          anyOf:
            - $ref: '#/components/schemas/OperationError'
            - type: 'null'
          description: Error information if the operation failed
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Expiration timestamp
          title: Expires At
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Service-specific metadata, such as progress percentage
          title: Metadata
        operation_id:
          description: Operation identifier
          title: Operation Id
          type: string
        response:
          anyOf:
            - $ref: '#/components/schemas/PanoDepthToRgbResult'
            - type: 'null'
          description: >-
            Result payload when done=true and no error. Structure depends on
            operation type.
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last update timestamp
          title: Updated At
      required:
        - operation_id
        - done
      title: Operation[PanoDepthToRgbResult]
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    DataBase64Reference:
      description: Reference to content via base64-encoded data.
      properties:
        data_base64:
          description: Base64-encoded content data
          title: Data Base64
          type: string
        extension:
          anyOf:
            - type: string
            - type: 'null'
          description: File extension without dot (e.g., 'jpg', 'png')
          title: Extension
        source:
          const: data_base64
          default: data_base64
          title: Source
          type: string
      required:
        - data_base64
      title: DataBase64Reference
      type: object
    MediaAssetReference:
      description: Reference to a previously uploaded MediaAsset.
      properties:
        media_asset_id:
          description: ID of a MediaAsset resource previously created and marked READY
          title: Media Asset Id
          type: string
        source:
          const: media_asset
          default: media_asset
          title: Source
          type: string
      required:
        - media_asset_id
      title: MediaAssetReference
      type: object
    UriReference:
      description: Reference to content via a publicly accessible URL.
      properties:
        source:
          const: uri
          default: uri
          title: Source
          type: string
        uri:
          description: Publicly accessible URL pointing to the media
          title: Uri
          type: string
      required:
        - uri
      title: UriReference
      type: object
    OperationCost:
      description: Settled credit cost for a successful operation.
      properties:
        line_items:
          description: Usage events that make up the operation's total credits
          items:
            $ref: '#/components/schemas/OperationCostLineItem'
          title: Line Items
          type: array
        total_credits:
          description: Total credits charged for the operation
          title: Total Credits
          type: integer
      required:
        - total_credits
      title: OperationCost
      type: object
    OperationError:
      description: Error information for a failed operation.
      properties:
        code:
          anyOf:
            - type: integer
            - type: 'null'
          description: Error code
          title: Code
        message:
          anyOf:
            - type: string
            - type: 'null'
          description: Error message
          title: Message
      title: OperationError
      type: object
    PanoDepthToRgbResult:
      description: |-
        Result from depth-to-RGB panorama generation.

        Returned inside ``Operation.response`` when the
        operation completes successfully (``done=true``).
      properties:
        pano_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            URL of the generated RGB panorama image. Available when the
            operation succeeds.
          title: Pano Url
      title: PanoDepthToRgbResult
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    OperationCostLineItem:
      description: A single usage event contributing to an operation's total credits.
      properties:
        credits:
          description: Credits charged for this usage event
          title: Credits
          type: integer
        name:
          description: Human-readable usage event name
          title: Name
          type: string
      required:
        - name
        - credits
      title: OperationCostLineItem
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: API key for authentication. Get your key from the developer portal.
      in: header
      name: WLT-Api-Key
      type: apiKey

````