> ## 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 template

> Save a private organization template. Curated AI Reserve templates are read-only. Returns `202 Accepted` with `resourceId`. Requires compute `manage` access.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/gpu/templates
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/templates:
    post:
      tags:
        - GPU Compute
      summary: Create template
      description: >-
        Save a private organization template. Curated AI Reserve templates are
        read-only. Returns `202 Accepted` with `resourceId`. Requires compute
        `manage` access.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComputeTemplateSpec'
      responses:
        '202':
          description: Template created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComputeAcceptedResponse'
        '403':
          description: Compute `manage` access required.
components:
  schemas:
    ComputeTemplateSpec:
      type: object
      required:
        - name
        - imageName
        - containerDiskGb
      properties:
        name:
          type: string
          maxLength: 120
        imageName:
          type: string
          description: Docker image reference.
        containerDiskGb:
          type: integer
          minimum: 1
          maximum: 1024
        env:
          type: object
          additionalProperties:
            type: string
        ports:
          type: array
          maxItems: 20
          items:
            type: object
            required:
              - port
              - protocol
            properties:
              port:
                type: integer
              protocol:
                type: string
                enum:
                  - http
                  - tcp
        dockerStartCmd:
          type: array
          items:
            type: string
          maxItems: 32
          description: Optional Docker entrypoint override.
    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).

````