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

# Create pod

> Launch a new GPU pod. Requires a signed `quoteId` from `POST /v1/gpu/quotes` to lock the price. Validates the spec, confirms live capacity, and authorizes the first compute hour from your wallet before dispatching to RunPod. Returns `202 Accepted` with a `resourceId` and `operationId` to poll for terminal status. Requires compute `manage` access. `Idempotency-Key` header is required.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/gpu/pods
openapi: 3.0.3
info:
  title: AI Reserve Gateway API
  description: >-
    The AI Reserve API surface — OpenAI-compatible chat completions,
    Anthropic-compatible messages, Bedrock Converse, images, video, files,
    text-to-speech, realtime voice sessions, and GPU Compute pod/volume
    management — all behind one endpoint and one API key.
  version: 1.0.0
servers:
  - url: https://api.aireserve.com
security:
  - bearerAuth: []
paths:
  /v1/gpu/pods:
    post:
      tags:
        - GPU Compute
      summary: Create pod
      description: >-
        Launch a new GPU pod. Requires a signed `quoteId` from `POST
        /v1/gpu/quotes` to lock the price. Validates the spec, confirms live
        capacity, and authorizes the first compute hour from your wallet before
        dispatching to RunPod. Returns `202 Accepted` with a `resourceId` and
        `operationId` to poll for terminal status. Requires compute `manage`
        access. `Idempotency-Key` header is required.
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          description: >-
            Client-generated key (8–180 chars, `[A-Za-z0-9:_-]`). Identical keys
            with the same normalized payload return the original accepted
            response without re-launching.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComputePodSpec'
            example:
              name: dev-box
              gpuTypeId: NVIDIA_A40
              gpuCount: 1
              dataCenterId: EU-RO-1
              templateId: <curated-template-id>
              containerDiskGb: 20
              networkVolumeId: <volume-id>
              sshKeyIds:
                - <key-id>
              quoteId: <quote-id>
              ephemeralDiskAcknowledged: true
      responses:
        '202':
          description: >-
            Pod creation accepted. Poll `GET /v1/gpu/operations/{operationId}`
            for terminal status.
          headers:
            Location:
              schema:
                type: string
              description: URL of the created pod resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComputeAcceptedResponse'
        '400':
          description: Validation error — check `message`.
        '402':
          description: >-
            Wallet balance insufficient to authorize the first compute hour, or
            organization has delinquent storage.
        '403':
          description: >-
            API key lacks compute `manage` access, or Compute is not enabled for
            your organization.
        '409':
          description: >-
            Quote has expired or price changed, conflicting operation in
            progress, or idempotency key conflict.
        '422':
          description: Spec is invalid — e.g. both `templateId` and `imageName` set.
        '503':
          description: >-
            Provider configuration is not ready or live Compute provisioning is
            pending operational verification.
components:
  schemas:
    ComputePodSpec:
      type: object
      description: >-
        Specification for creating a new GPU pod. A signed quote (`quoteId`)
        from `POST /v1/gpu/quotes` is required to lock the price before
        creation.
      required:
        - name
        - gpuTypeId
        - gpuCount
        - dataCenterId
        - containerDiskGb
        - quoteId
        - ephemeralDiskAcknowledged
      properties:
        name:
          type: string
          maxLength: 120
        gpuTypeId:
          type: string
          description: GPU type ID from `GET /v1/gpu/catalog/gpus`.
        gpuCount:
          type: integer
          minimum: 1
          maximum: 16
        dataCenterId:
          type: string
          description: Data center ID from `GET /v1/gpu/catalog/datacenters`.
        imageName:
          type: string
          description: >-
            Docker image reference for a custom image. Mutually exclusive with
            `templateId`.
        templateId:
          type: string
          format: uuid
          description: Template ID to use. Mutually exclusive with `imageName`.
        containerDiskGb:
          type: integer
          minimum: 1
          maximum: 1024
          description: >-
            Ephemeral container disk in GiB. Contents are lost on stop or
            termination. Acknowledge via `ephemeralDiskAcknowledged: true`.
        networkVolumeId:
          type: string
          format: uuid
          description: >-
            Persistent network volume to attach. Must be ready, unattached, and
            in the same data center.
        volumeMountPath:
          type: string
          default: /workspace
          description: Mount path for the network volume inside the container.
        registryCredentialId:
          type: string
          format: uuid
          description: Registry credential ID to use when pulling a private image.
        sshKeyIds:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 20
          description: >-
            SSH public key IDs to inject via the `PUBLIC_KEY` environment
            variable.
        env:
          type: object
          additionalProperties:
            type: string
          description: >-
            Environment variables injected into the container. Values are
            encrypted at rest and never echoed back.
        ports:
          type: array
          maxItems: 20
          items:
            type: object
            required:
              - port
              - protocol
            properties:
              port:
                type: integer
                minimum: 1
                maximum: 65535
              protocol:
                type: string
                enum:
                  - http
                  - tcp
          description: >-
            Ports to expose. HTTP ports create public proxy URLs not protected
            by AI Reserve authentication.
        quoteId:
          type: string
          description: >-
            Signed quote token from `POST /v1/gpu/quotes`. Binds the hardware
            spec and locks the price. Expires after 2 minutes.
        ephemeralDiskAcknowledged:
          type: boolean
          enum:
            - true
          description: >-
            Must be `true`. Confirms you understand that the container disk is
            ephemeral and its contents are lost on stop or termination.
    ComputeAcceptedResponse:
      type: object
      description: >-
        Response to a `202 Accepted` Compute mutation. All fields are camelCase.
        Use `operationId` to poll `GET /v1/gpu/operations/{id}` for terminal
        status.
      required:
        - accepted
        - resourceId
        - operationId
        - status
      properties:
        accepted:
          type: boolean
          enum:
            - true
        resourceId:
          type: string
          format: uuid
          description: ID of the resource created or mutated.
        resourceType:
          type: string
          enum:
            - pod
            - volume
            - template
            - registry
            - ssh_key
        operationId:
          type: string
          format: uuid
          description: >-
            ID for the durable operation record. Poll `GET
            /v1/gpu/operations/{id}` for terminal status.
        status:
          type: string
          enum:
            - accepted
            - pending
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your AI Reserve API key (aireserve_api_…) from the API Keys page in the
        portal (https://portal.aireserve.com/keys).

````