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

# One asset: variants with file URLs, capabilities per runtime, license and credit

> Ids contain a colon and can contain slashes: URL-encode them.



## OpenAPI

````yaml /api-reference/openapi.json get /assets/{id}
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /assets/{id}:
    get:
      tags:
        - Assets
      summary: >-
        One asset: variants with file URLs, capabilities per runtime, license
        and credit
      description: 'Ids contain a colon and can contain slashes: URL-encode them.'
      parameters:
        - schema:
            type: string
            example: polyhaven:wooden_crate_02
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: Runtime the capabilities and variants are for
            example: patch-web@1
          required: false
          description: Runtime the capabilities and variants are for
          name: runtime
          in: query
      responses:
        '200':
          description: The asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Asset:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        type_label:
          type: string
        title:
          type: string
        title_by:
          type: string
          enum:
            - upstream
            - patch
        description:
          type:
            - string
            - 'null'
        tags:
          type: array
          items:
            type: string
        source:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            ref:
              type: string
            rev:
              type:
                - string
                - 'null'
            url:
              type: string
          required:
            - id
            - name
            - ref
            - rev
            - url
        creators:
          type: array
          items:
            type: string
        license:
          allOf:
            - $ref: '#/components/schemas/AssetLicense'
            - type: object
              properties:
                evidence:
                  type: object
                  properties:
                    where:
                      type: string
                    url:
                      type: string
                    found:
                      type: string
                    checked_at:
                      type: string
                  required:
                    - where
                    - url
                    - found
                    - checked_at
              required:
                - evidence
        credit:
          type: string
        ai:
          type: boolean
        generated_by:
          type:
            - string
            - 'null'
        capabilities:
          type: array
          items:
            type: string
        capabilities_on:
          type: array
          items:
            type: object
            properties:
              runtime:
                type: string
              keeps:
                type: array
                items:
                  type: string
              dropped:
                type: array
                items:
                  type: object
                  properties:
                    capability:
                      type: string
                    reason:
                      type: string
                  required:
                    - capability
                    - reason
            required:
              - runtime
              - keeps
              - dropped
        traits:
          type: array
          items:
            type: string
        facts:
          type: object
          additionalProperties: {}
        prep:
          type: object
          properties:
            state:
              type: string
              enum:
                - indexed
                - converting
                - ready
                - failed
            eta_s:
              type: number
            error:
              type: string
            on_demand:
              type: boolean
              enum:
                - false
              description: >-
                False when it isn't ready and this server doesn't convert on
                demand (AS-216)
            note:
              type: string
          required:
            - state
        thumbnail_url:
          type:
            - string
            - 'null'
        original:
          type:
            - object
            - 'null'
          properties:
            format:
              type: string
            size:
              type:
                - number
                - 'null'
          required:
            - format
            - size
        group:
          type:
            - object
            - 'null'
          properties:
            key:
              type: string
            alternatives:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  title:
                    type: string
                  source:
                    type: string
                  prep:
                    type: string
                    enum:
                      - indexed
                      - converting
                      - ready
                      - failed
                required:
                  - id
                  - title
                  - source
                  - prep
          required:
            - key
            - alternatives
        variants:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              runtimes:
                type: array
                items:
                  type: string
              carries:
                type: array
                items:
                  type: string
              dropped:
                type: array
                items:
                  type: object
                  properties:
                    capability:
                      type: string
                    reason:
                      type: string
                  required:
                    - capability
                    - reason
              facts:
                type: object
                additionalProperties: {}
              size:
                type: number
              mb:
                type: number
              files:
                type: array
                items:
                  type: object
                  properties:
                    role:
                      type: string
                    name:
                      type: string
                    sha256:
                      type: string
                    size:
                      type: number
                    content_type:
                      type: string
                    url:
                      type:
                        - string
                        - 'null'
                  required:
                    - role
                    - name
                    - sha256
                    - size
                    - content_type
                    - url
            required:
              - name
              - runtimes
              - carries
              - dropped
              - facts
              - size
              - mb
              - files
        picked:
          type: object
          properties:
            runtime:
              type: string
            variant:
              type:
                - string
                - 'null'
          required:
            - runtime
            - variant
        folder:
          type: string
        usage:
          type: string
        untrusted_fields:
          type: array
          items:
            type: string
      required:
        - id
        - type
        - type_label
        - title
        - title_by
        - description
        - tags
        - source
        - creators
        - license
        - credit
        - ai
        - generated_by
        - capabilities
        - capabilities_on
        - traits
        - facts
        - prep
        - thumbnail_url
        - original
        - group
        - variants
        - picked
        - folder
        - usage
        - untrusted_fields
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
    AssetLicense:
      type: object
      properties:
        spdx:
          type: string
        name:
          type: string
        url:
          type: string
        duties:
          type: array
          items:
            type: string
            enum:
              - attribute
              - link-license
              - indicate-changes
              - no-endorsement
              - no-added-restrictions
        text_url:
          type: string
      required:
        - spdx
        - name
        - url
        - duties
        - text_url

````

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