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

# Get By Inference Operation



## OpenAPI

````yaml /openapi.json get /api/v1/inference/operations/{inference_operation_id}
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
  x-trajectory-api-version: '2026-10-14'
  description: >-
    This contract is API version 2026-10-14. The optional Trajectory-API-Version
    header pins it, and tmp-contract is accepted as an alias. Requests without
    the header get this version. Version 2026-10-07 and the pre-launch legacy
    response formats are retired.
servers:
  - url: https://api.trajectory.ai
security: []
tags:
  - name: agents
    x-group: Agents
  - name: benchmarks
    x-group: Specs (benchmarks)
  - name: diagnostics
    x-group: Diagnostics
  - name: benchmark-ingestion
    x-group: Spec (benchmark) submissions
  - name: eval
    x-group: Evaluations
  - name: training
    x-group: Training
  - name: deployments
    x-group: Deployments
  - name: model-endpoints
    x-group: Model endpoints
  - name: inference
    x-group: Inference
  - name: trajectories
    x-group: Trajectories
  - name: artifacts
    x-group: Artifacts
  - name: telemetry
    x-group: Telemetry
  - name: supported-models
    x-group: Supported models
  - name: organizations
    x-group: Organizations
  - name: secrets
    x-group: Secrets
paths:
  /api/v1/inference/operations/{inference_operation_id}:
    get:
      tags:
        - inference
      summary: Get By Inference Operation
      operationId: getInferenceOperation
      parameters:
        - name: inference_operation_id
          in: path
          required: true
          schema:
            type: string
            title: Inference Operation Id
        - name: wait_seconds
          in: query
          required: false
          schema:
            type: number
            maximum: 30
            minimum: 0
            default: 30
            title: Wait Seconds
        - name: X-Trajectory-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Trajectory-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceOperationResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceErrorEnvelope'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceErrorEnvelope'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceErrorEnvelope'
          description: Conflict
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceErrorEnvelope'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceErrorEnvelope'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceErrorEnvelope'
          description: Service Unavailable
      security:
        - InferenceAuthorization: []
        - ApiKeyAuth: []
components:
  schemas:
    InferenceOperationResponse:
      properties:
        id:
          type: string
          title: Id
        status:
          $ref: '#/components/schemas/InferenceOperationState'
        status_url:
          type: string
          title: Status Url
        deadline_at:
          type: string
          format: date-time
          title: Deadline At
        failure_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Code
        failure:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Failure
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
      type: object
      required:
        - id
        - status
        - status_url
        - deadline_at
      title: InferenceOperationResponse
    InferenceErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/InferenceErrorDetail'
      type: object
      required:
        - error
      title: InferenceErrorEnvelope
    InferenceOperationState:
      type: string
      enum:
        - PENDING
        - IN_PROGRESS
        - COMPLETED
        - FAILED
      title: InferenceOperationState
    InferenceErrorDetail:
      properties:
        message:
          type: string
          title: Message
        type:
          type: string
          title: Type
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
      type: object
      required:
        - message
        - type
      title: InferenceErrorDetail
  securitySchemes:
    InferenceAuthorization:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````

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