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

# Register new program

> Register a new OpenVM program from pre-built artifacts.

    Build the program locally with `cargo openvm build`, then upload the resulting ELF
    binary together with the transpiled VMEXE. The backend computes the program's
    exe_commit and verification baseline asynchronously (via a lightweight Kubernetes job)
    and flips the program to `Ready` — no cloud compilation happens.

    ## Example Usage

    ```bash
    curl -X POST "https://api.axiom.xyz/v1/programs?config_id=cfg_xxxx" \
      -H "Axiom-API-Key: your-api-key" \
      -F "elf=@program.elf" \
      -F "vmexe=@program.vmexe" \
      -F "project_name=My Project"
    ```



## OpenAPI

````yaml POST /v1/programs
openapi: 3.1.0
info:
  title: Axiom Proving API
  description: |-
    ## Axiom Proving Service API

        The Axiom Proving API allows you to compile, execute, and prove OpenVM programs on Axiom's cloud infrastructure.

        **Core Concepts:**
        - **Program**: Compiled OpenVM binary, versioned within a project (built via compilation API)
        - **Project**: Container for program versions - auto-created if not specified during program upload
        - **Proof**: Zero-knowledge proof of program execution
        - **Execution**: Test run without proof generation (faster, for debugging before proving)

        **Authentication:**
        - CLI endpoints (`/v1/`): API key in `Axiom-API-Key` header
        - Web console endpoints (`/console/v1/`): Bearer token authentication

        All endpoints require appropriate authentication for your organization.
        
  version: 2.0.0
servers:
  - url: https://api.axiom.xyz
    description: Production API
  - url: https://api.staging.app.axiom.xyz
    description: Staging API
security: []
paths:
  /v1/programs:
    post:
      tags:
        - programs
      summary: Register Program
      description: |-
        Register a new OpenVM program from pre-built artifacts.

            Build the program locally with `cargo openvm build`, then upload the resulting ELF
            binary together with the transpiled VMEXE. The backend computes the program's
            exe_commit and verification baseline asynchronously (via a lightweight Kubernetes job)
            and flips the program to `Ready` — no cloud compilation happens.

            ## Example Usage

            ```bash
            curl -X POST "https://api.axiom.xyz/v1/programs?config_id=cfg_xxxx" \
              -H "Axiom-API-Key: your-api-key" \
              -F "elf=@program.elf" \
              -F "vmexe=@program.vmexe" \
              -F "project_name=My Project"
            ```
      operationId: register_program_v1_programs_post
      parameters:
        - name: config_id
          in: query
          required: true
          schema:
            type: string
            description: 'The ID of the config to use (format: cfg_{ulid})'
            title: Config Id
          description: 'The ID of the config to use (format: cfg_{ulid})'
        - name: program_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional custom name for the program
            title: Program Name
          description: Optional custom name for the program
        - name: commit_sha
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: If applicable, the commit sha of the guest program
            title: Commit Sha
          description: If applicable, the commit sha of the guest program
        - name: project_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The ID of the project to associate this program with. If not
              provided, a new project will be created.
            title: Project Id
          description: >-
            The ID of the project to associate this program with. If not
            provided, a new project will be created.
        - name: project_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Name for new project if project_id is not provided
            title: Project Name
          description: Name for new project if project_id is not provided
        - name: default_num_gpus
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 1
            description: Default number of GPUs to use for proofs of this program
            default: 8
            title: Default Num Gpus
          description: Default number of GPUs to use for proofs of this program
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_register_program_v1_programs_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostResponse'
        '201':
          description: Program registered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostResponse'
        '400':
          description: Invalid files or parameters
        '404':
          description: Not found
        '413':
          description: Files too large
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_register_program_v1_programs_post:
      properties:
        elf:
          type: string
          format: binary
          title: Elf
          description: Pre-built ELF binary
        vmexe:
          type: string
          format: binary
          title: Vmexe
          description: Transpiled VMEXE file
      type: object
      required:
        - elf
        - vmexe
      title: Body_register_program_v1_programs_post
    PostResponse:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
        - id
      title: PostResponse
      description: Generic response for POST operations.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Axiom-API-Key

````