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

# Agent key only: long-poll (at most 25 s) for candidate runs queued for this agent



## OpenAPI

````yaml /openapi.json get /api/v1/agent/commands
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.2
servers:
  - description: Local InferCrane API and gateway
    url: http://127.0.0.1:18000
security: []
tags:
  - name: Admission
  - name: Adoption
  - name: Agents
  - name: Alerts
  - name: Async inference
  - name: Audit
  - name: Autopilot
  - name: Benchmarks
  - name: Billing
  - name: Billing administration
  - name: Burst Guard
  - name: Capacity intelligence
  - name: Compute
  - 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: Inference optimization
  - name: Infrastructure
  - name: Marketplace administration
  - name: Migration Proof
  - name: Model API administration
  - name: Model APIs
  - name: Model artifacts
  - name: Model catalog
  - name: Monitoring
  - name: Notifications
  - name: Operations
  - name: Planning
  - name: Providers
  - 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/agent/commands:
    get:
      tags:
        - Agents
      summary: >-
        Agent key only: long-poll (at most 25 s) for candidate runs queued for
        this agent
      operationId: agentCommands
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCommands'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Typed API error
      security:
        - bearerAuth: []
components:
  schemas:
    AgentCommands:
      additionalProperties: true
      properties:
        commands:
          items:
            additionalProperties: true
            properties:
              attempt:
                type: integer
              control:
                description: The current setup, by the agent's own server key.
                properties:
                  endpoint:
                    pattern: ^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$
                    type: string
                  model:
                    type: string
                  server_key:
                    pattern: ^[a-z0-9][a-z0-9._:-]{0,127}$
                    type: string
                type: object
              deadline_at:
                format: date-time
                type: string
              id:
                type: string
              kind:
                enum:
                  - run_candidate
                type: string
              run_candidate:
                $ref: '#/components/schemas/CandidateRunCreate'
            required:
              - id
              - kind
            type: object
          maxItems: 4
          type: array
      required:
        - commands
      type: object
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
      type: object
    CandidateRunCreate:
      additionalProperties: false
      description: >-
        A candidate setup to try in the agent's own cluster. The image must be
        pinned by digest and allowed by the agent's operator; the entry point
        cannot be a shell.
      properties:
        accelerator:
          maxLength: 256
          type: string
        endpoint:
          pattern: ^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$
          type: string
        gpu_count:
          maximum: 16
          minimum: 1
          type: integer
        label:
          maxLength: 128
          type: string
        load:
          additionalProperties: false
          properties:
            concurrency:
              maximum: 256
              minimum: 1
              type: integer
            input_tokens:
              maximum: 32768
              minimum: 1
              type: integer
            output_tokens:
              maximum: 32768
              minimum: 1
              type: integer
            requests:
              maximum: 5000
              minimum: 1
              type: integer
            streaming:
              type: boolean
            tokenizer:
              maxLength: 256
              type: string
          required:
            - requests
            - concurrency
            - input_tokens
            - output_tokens
          type: object
        model:
          maxLength: 256
          type: string
        model_revision:
          maxLength: 256
          type: string
        quality:
          additionalProperties: false
          properties:
            eval_set:
              description: >-
                default is the built-in public suite; local:NAME is an eval set
                kept beside the agent, whose prompts never leave the cluster.
              pattern: ^(default|local:[a-z0-9][a-z0-9._-]{0,62})$
              type: string
            skip:
              type: boolean
          type: object
        runtime_args:
          items:
            maxLength: 512
            type: string
          maxItems: 64
          type: array
        timeout_seconds:
          maximum: 21600
          minimum: 60
          type: integer
        workload:
          $ref: '#/components/schemas/RuntimeWorkload'
      required:
        - endpoint
        - label
        - model
        - workload
        - accelerator
        - gpu_count
        - load
      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
    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
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.