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

# Create a provider-managed deployment



## OpenAPI

````yaml /openapi.json post /api/v1/deployments
openapi: 3.1.0
info:
  description: >-
    Durable, authenticated control-plane operations. Mutation responses may
    outlive the requesting client.
  title: InferCrane Control API
  version: 2.0.0
servers:
  - description: Local InferCrane API and gateway
    url: http://127.0.0.1:18000
security: []
tags:
  - name: Admission
  - name: Adoption
  - name: Alerts
  - name: Async inference
  - name: Audit
  - name: Autopilot
  - name: Benchmarks
  - name: Burst Guard
  - name: Capacity intelligence
  - name: Context Passport
  - name: Deployments
  - name: Diagnostics
  - name: Endpoints
  - name: External capacity
  - name: FinOps
  - name: Identity
  - name: Inference
  - name: Inference Lab
  - name: Inference decisions
  - name: Infrastructure
  - name: Model artifacts
  - name: Monitoring
  - name: Operations
  - name: Recipes
  - name: Release Guard
  - name: Release evidence
  - name: Replay
  - name: Revisions
  - name: Routing
  - name: Sandboxes
  - name: Scaling
  - name: Secrets
  - name: System
  - name: Targets
  - name: Training lineage
paths:
  /api/v1/deployments:
    post:
      tags:
        - Deployments
      summary: Create a provider-managed deployment
      operationId: createDeployment
      parameters:
        - description: >-
            Stable key used to adopt the original durable operation after
            retries or disconnects.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 128
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentCreate'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentOperationEnvelope'
          description: Durable operation accepted
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Typed API error
      security:
        - bearerAuth: []
components:
  schemas:
    DeploymentCreate:
      properties:
        cloud:
          type: string
        compute_mode:
          enum:
            - elastic
            - serverless
          type: string
        gpu:
          type: string
        max_replicas:
          minimum: 0
          type: integer
        min_replicas:
          minimum: 0
          type: integer
        model:
          type: string
        model_revision:
          type: string
        name:
          type: string
        port:
          maximum: 65535
          minimum: 1
          type: integer
        provider_adapter:
          description: >-
            Exact provider profile for this immutable revision; omit only when
            the cloud/runtime default is unambiguous.
          type: string
        region:
          type: string
        runtime:
          default: vllm
          enum:
            - vllm
            - sglang
            - custom-oci
          type: string
        runtime_args:
          items:
            type: string
          type: array
        runtime_version:
          type: string
        workload:
          $ref: '#/components/schemas/RuntimeWorkload'
      required:
        - name
        - model
      type: object
    DeploymentOperationEnvelope:
      allOf:
        - $ref: '#/components/schemas/OperationEnvelope'
        - properties:
            deployment:
              $ref: '#/components/schemas/Deployment'
          type: object
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
      type: object
    RuntimeWorkload:
      additionalProperties: false
      properties:
        cancellation:
          enum:
            - http-disconnect
          type: string
        command:
          items:
            type: string
          minItems: 1
          type: array
        drain:
          enum:
            - connection
          type: string
        image:
          pattern: '@sha256:[a-f0-9]{64}$'
          type: string
        metrics_path:
          enum:
            - /metrics
          type: string
        models_path:
          enum:
            - /v1/models
          type: string
        port:
          maximum: 65535
          minimum: 1
          type: integer
        protocol:
          enum:
            - openai
          type: string
        readiness_path:
          enum:
            - /health
          type: string
        shutdown_grace_seconds:
          maximum: 3600
          minimum: 1
          type: integer
      required:
        - image
        - command
        - protocol
        - port
        - readiness_path
        - models_path
        - metrics_path
        - cancellation
        - drain
        - shutdown_grace_seconds
      type: object
    OperationEnvelope:
      properties:
        created:
          type: boolean
        operation:
          $ref: '#/components/schemas/Operation'
      required:
        - operation
      type: object
    Deployment:
      properties:
        active_revision_id:
          type: string
        candidate_revision_id:
          type: string
        id:
          type: string
        max_replicas:
          type: integer
        min_replicas:
          type: integer
        model:
          type: string
        name:
          type: string
        observed_state:
          type: string
        runtime:
          type: string
      required:
        - name
        - model
        - runtime
      type: object
    Error:
      properties:
        category:
          type: string
        code:
          type: string
        message:
          type: string
        remediation:
          type: string
        request_id:
          type: string
        retryable:
          type: boolean
      required:
        - code
        - message
      type: object
    Operation:
      properties:
        attempt:
          type: integer
        cancel_requested:
          type: boolean
        created_at:
          format: date-time
          type: string
        error_code:
          type: string
        id:
          type: string
        kind:
          type: string
        max_attempts:
          type: integer
        message:
          type: string
        progress:
          maximum: 100
          minimum: 0
          type: integer
        resource_name:
          type: string
        resource_type:
          type: string
        retryable:
          type: boolean
        status:
          enum:
            - pending
            - leased
            - running
            - waiting
            - cancelling
            - succeeded
            - failed
            - cancelled
          type: string
        updated_at:
          format: date-time
          type: string
      required:
        - id
        - kind
        - status
        - progress
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````