Blaxel Compute API

The Compute API from Blaxel — 6 operation(s) for compute.

Documentation

Specifications

Other Resources

OpenAPI Specification

blaxel-compute-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Blaxel Control Plane Agents Compute API
  description: Representative specification of the Blaxel (formerly Beamlit) control plane REST API. The control plane manages agents, MCP/function servers, models, sandboxes, jobs, policies, integrations, and workspaces. Authenticate with a Bearer API key (Authorization or X-Blaxel-Authorization header) or an OAuth 2.0 short-lived JWT. Requests may include a Blaxel-Version header (YYYY-MM-DD) and, for multi-workspace accounts, an X-Blaxel-Workspace header.
  termsOfService: https://blaxel.ai/terms-of-service
  contact:
    name: Blaxel Support
    email: support@blaxel.ai
  version: v0
servers:
- url: https://api.blaxel.ai/v0
security:
- apiKey: []
- bearerAuth: []
tags:
- name: Compute
paths:
  /sandboxes:
    get:
      operationId: listSandboxes
      tags:
      - Compute
      summary: List all sandboxes in the workspace.
      responses:
        '200':
          description: A list of sandboxes.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Sandbox'
    post:
      operationId: createSandbox
      tags:
      - Compute
      summary: Create a new sandbox.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Sandbox'
      responses:
        '200':
          description: The created sandbox.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sandbox'
  /sandboxes/{sandbox_name}:
    parameters:
    - $ref: '#/components/parameters/SandboxName'
    get:
      operationId: getSandbox
      tags:
      - Compute
      summary: Get a sandbox by name.
      responses:
        '200':
          description: The requested sandbox.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sandbox'
    put:
      operationId: updateSandbox
      tags:
      - Compute
      summary: Update a sandbox by name.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Sandbox'
      responses:
        '200':
          description: The updated sandbox.
    delete:
      operationId: deleteSandbox
      tags:
      - Compute
      summary: Delete a sandbox by name.
      responses:
        '200':
          description: The deleted sandbox.
  /sandboxes/{sandbox_name}/start:
    parameters:
    - $ref: '#/components/parameters/SandboxName'
    post:
      operationId: startSandbox
      tags:
      - Compute
      summary: Start a sandbox.
      responses:
        '200':
          description: The started sandbox.
  /sandboxes/{sandbox_name}/stop:
    parameters:
    - $ref: '#/components/parameters/SandboxName'
    post:
      operationId: stopSandbox
      tags:
      - Compute
      summary: Stop a sandbox.
      responses:
        '200':
          description: The stopped sandbox.
  /sandboxes/{sandbox_name}/previews:
    parameters:
    - $ref: '#/components/parameters/SandboxName'
    get:
      operationId: listSandboxPreviews
      tags:
      - Compute
      summary: List previews for a sandbox.
      responses:
        '200':
          description: A list of sandbox previews.
    post:
      operationId: createSandboxPreview
      tags:
      - Compute
      summary: Create a preview for a sandbox.
      responses:
        '200':
          description: The created sandbox preview.
  /sandboxes/{sandbox_name}/previews/{preview_name}/tokens:
    parameters:
    - $ref: '#/components/parameters/SandboxName'
    - name: preview_name
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: listSandboxPreviewTokens
      tags:
      - Compute
      summary: List tokens for a sandbox preview.
      responses:
        '200':
          description: A list of preview tokens.
    post:
      operationId: createSandboxPreviewToken
      tags:
      - Compute
      summary: Create a token for a sandbox preview.
      responses:
        '200':
          description: The created preview token.
components:
  schemas:
    Metadata:
      type: object
      properties:
        name:
          type: string
        displayName:
          type: string
        workspace:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        labels:
          type: object
          additionalProperties:
            type: string
    Sandbox:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        spec:
          type: object
          properties:
            runtime:
              type: object
            ttl:
              type: string
            memory:
              type: integer
  parameters:
    SandboxName:
      name: sandbox_name
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Blaxel-Authorization
      description: API key supplied as "Bearer YOUR-API-KEY".
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 short-lived JWT access token.