---
title: "Submit Inference Operation"
method: POST
path: "/api/v1/inference/operations"
tags: ["inference"]
---

# Submit Inference Operation

`POST /api/v1/inference/operations`

## Request

- Base URL: `https://api.trajectory.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.trajectory.ai/api/v1/inference/operations`
- Auth: HTTP bearer

## Headers

- `X-Trajectory-Id` string, required
- `Idempotency-Key` string, required
- `X-API-Key` string, nullable

## Request body

- union
  - ChatInferenceOperationInput
    - `api` 'chat', required
    - `input` ChatCompletionRequest, required
      - `model` string, required
      - `messages` ChatMessage[], required
        - `role` string, required
        - `content` union
          - string
          - object[]
      - `stream` boolean, nullable
      - `disable_thinking` boolean, nullable
      - `temperature` number, nullable
      - `max_tokens` integer, nullable: Maximum generated tokens, including reasoning tokens when emitted.
      - `top_p` number, nullable
  - ResponsesInferenceOperationInput
    - `api` 'responses', required
    - `input` CreateResponseRequest, required
      - `model` string, required
      - `input` union, required
        - string
        - object[]
      - `stream` boolean, nullable
      - `disable_thinking` boolean, nullable

## Response `202`

Successful Response

- InferenceOperationResponse
  - `id` string, required
  - `status` 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required
  - `status_url` string, required
  - `deadline_at` string, date-time, required
  - `failure_code` string, nullable
  - `failure` object, nullable
  - `result` object, nullable

## Changes

- **2026-10-31** `7b218d495d5c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/trajectory/apis/trajectory-api/changes/api/v1/inference/operations/post.md)

---

[API](https://skmtc.dev/trajectory/apis/trajectory-api.md) - [All operations](https://skmtc.dev/trajectory/apis/trajectory-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trajectory/apis/trajectory-api/revisions/5b5a8ae4b4a4?raw)
