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

# Create a release

> Records a release manifest: every file's path, sha256 and size, and optionally whether it is executable. The response lists the content hashes the server does not hold yet (content is deduplicated per computer by sha256) and the next request to make. Paths are relative; .., absolute paths, backslashes, NUL, duplicates and anything under .git/ are rejected. Limits: 20,000 files, 25 MiB per file and 1 GiB in total.



## OpenAPI

````yaml https://www.cool.computer/openapi.json post /api/computers/{id}/releases
openapi: 3.1.0
info:
  title: Cool Computers API
  version: 1.0.0
  description: >-
    Create and operate reachable Linux computers. Each computer keeps a stable
    name.cool.computer address, persistent files, and agent-ready command
    execution. REST requests use UTC-aligned one-minute limits: 600 requests per
    account identified by a recognized valid account bearer credential, a
    separate 600-request budget per computer-scoped credential, or 60 requests
    per source IP otherwise. Read-only GETs answered from API state spend a
    separate read budget reported as account-read or computer-read, so status
    polling cannot exhaust the budget that protects work and mutations. To bound
    authentication-provider traffic, at most 60 first-seen bearer values are
    checked per source IP in a minute; recognized valid credentials use their
    account or computer policy. Successful bearer authentication is reused for
    at most five seconds; transient provider failures are not cached. Non-exempt
    API responses include the structured RateLimit and RateLimit-Policy fields;
    request admission 429 responses use code api_request_rate_exceeded and also
    include Retry-After. Health, OpenAPI, webhooks, callbacks, SSE, and
    WebSocket endpoints are exempt from the REST request budget. Authenticated
    SSE connection attempts remain subject to the authentication safeguards and
    can receive the same typed 429 response.
servers:
  - url: https://api.cool.computer
    description: Canonical API origin
security: []
tags:
  - name: Authentication
    description: Obtain and manage bearer credentials.
  - name: Billing
    description: Inspect and manage the account's no-card trial or Pro plan.
  - name: Computers
    description: Create, inspect, and delete resident computers.
  - name: Execution
    description: Run commands on a computer.
  - name: Files
    description: Read and change a computer's persistent files.
  - name: Publishing
    description: >-
      Publish files to a computer's URL as immutable releases, with no VM. To
      show something, publish the files; to run something, use the computer
      (exec, terminal, services), which gets Linux on first use.
  - name: Services
    description: >-
      Manage processes and select the HTTP port exposed at a computer's stable
      address.
  - name: Email
    description: Read and send mail through a computer's inbox.
  - name: Network
    description: Control a computer's public visibility and outbound network policy.
  - name: Sharing
    description: Invite people to use a computer without granting owner controls.
  - name: Public
    description: Unauthenticated discovery endpoints.
externalDocs:
  description: Cool Computers agent registration guide
  url: https://www.cool.computer/auth.md
paths:
  /api/computers/{id}/releases:
    post:
      tags:
        - Publishing
      summary: Create a release
      description: >-
        Records a release manifest: every file's path, sha256 and size, and
        optionally whether it is executable. The response lists the content
        hashes the server does not hold yet (content is deduplicated per
        computer by sha256) and the next request to make. Paths are relative;
        .., absolute paths, backslashes, NUL, duplicates and anything under
        .git/ are rejected. Limits: 20,000 files, 25 MiB per file and 1 GiB in
        total.
      operationId: createComputerRelease
      parameters:
        - $ref: '#/components/parameters/ComputerID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseCreate'
      responses:
        '201':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: The new release, the hashes to upload and the next request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseCreated'
        '400':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: Bad Request. `invalid_release` names the rejected path or limit.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: Not Found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: >-
            Conflict. `publish_in_progress`: the computer is still being created
            or is gaining a VM.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '413':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: Payload Too Large.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: >-
            Unprocessable Content. `content_size_conflict`: one sha256 is listed
            with two sizes.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
            Retry-After:
              $ref: '#/components/headers/Retry-After'
          description: >-
            Too Many Requests. If the problem code is api_request_rate_exceeded,
            wait for Retry-After seconds; other problem codes describe a
            separate limit.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: Internal Server Error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: >-
            Service Unavailable. `artifacts_unavailable` means publishing is not
            configured on this server.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        default:
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: >-
            A machine-readable API error with a stable code and recovery
            instruction.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearerAuth: []
components:
  parameters:
    ComputerID:
      name: id
      in: path
      required: true
      description: Stable public computer identifier.
      schema:
        type: string
        minLength: 1
        example: cmp_123
  schemas:
    ReleaseCreate:
      type: object
      additionalProperties: false
      required:
        - files
      properties:
        files:
          type: array
          minItems: 1
          maxItems: 20000
          items:
            $ref: '#/components/schemas/ReleaseFile'
    ReleaseCreated:
      type: object
      additionalProperties: false
      required:
        - release
        - missing
        - next
      properties:
        release:
          $ref: '#/components/schemas/Release'
        missing:
          type: array
          items:
            type: string
            pattern: ^[0-9a-f]{64}$
        next:
          $ref: '#/components/schemas/ReleaseNext'
    Problem:
      type: object
      additionalProperties: false
      required:
        - type
        - title
        - status
        - code
        - detail
        - resolution
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          minimum: 400
          maximum: 599
        code:
          type: string
          pattern: ^[a-z0-9_]+$
        detail:
          type: string
        resolution:
          type: string
        context:
          type: object
          additionalProperties: true
    ReleaseFile:
      type: object
      additionalProperties: false
      required:
        - path
        - sha256
        - size
      properties:
        path:
          type: string
          minLength: 1
          description: Relative path such as index.html or assets/app.js.
        sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
        size:
          type: integer
          format: int64
          minimum: 0
          maximum: 26214400
        executable:
          type: boolean
          default: false
          description: >-
            A computer's VM gets this file with mode 0755 instead of 0644, so
            run or a service can start it. Serving files from the edge ignores
            it.
    Release:
      type: object
      additionalProperties: false
      required:
        - number
        - state
        - live
        - files
        - bytes
        - created_at
      properties:
        number:
          type: integer
          minimum: 1
        state:
          type: string
          enum:
            - uploading
            - ready
            - failed
        live:
          type: boolean
        files:
          type: integer
          minimum: 0
        bytes:
          type: integer
          format: int64
          minimum: 0
        created_at:
          type: string
          format: date-time
        ready_at:
          type: string
          format: date-time
    ReleaseNext:
      type: object
      additionalProperties: false
      required:
        - action
      description: 'What to do next: upload the missing hashes, finalize, or nothing (done).'
      properties:
        action:
          type: string
          enum:
            - upload
            - finalize
            - done
        upload:
          $ref: '#/components/schemas/ReleaseLink'
        finalize:
          $ref: '#/components/schemas/ReleaseLink'
    ReleaseLink:
      type: object
      additionalProperties: false
      required:
        - method
        - href
      properties:
        method:
          type: string
          enum:
            - PUT
            - POST
        href:
          type: string
          description: API path; {sha256} stands for each missing hash.
  headers:
    RateLimit:
      description: >-
        The applied policy name, requests remaining after this request, and
        whole seconds until the current UTC-aligned window resets.
      schema:
        type: string
        pattern: >-
          ^"(account|account-read|computer|computer-read|source)";r=[0-9]+;t=([1-9]|[1-5][0-9]|60)$
        examples:
          - '"account";r=599;t=42'
          - '"computer-read";r=598;t=42'
    RateLimit-Policy:
      description: >-
        The selected policy name, quota, and window in seconds. Valid account
        credentials use account or account-read with q=600, computer credentials
        use computer or computer-read with q=600, and unauthenticated or
        unrecognized requests use source with q=60 for their source IP.
      schema:
        type: string
        pattern: >-
          ^("(account|account-read|computer|computer-read)";q=600|"source";q=60);w=60$
        examples:
          - '"account";q=600;w=60'
          - '"computer-read";q=600;w=60'
    Retry-After:
      description: >-
        Whole seconds to wait after an api_request_rate_exceeded response before
        retrying. Other 429 problem codes describe separate resource or provider
        limits and do not inherit this retry value.
      schema:
        type: integer
        minimum: 1
        maximum: 60
        examples:
          - 42
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: WorkOS user or agent access token, or Cool Computers API key
      description: >-
        A Cool Computers API key, user access token, or claimed agent access
        token in the Authorization header. Follow
        https://www.cool.computer/auth.md for agent registration and
        https://www.cool.computer/authentication.md for direct user credentials.

````