Trajectory Deployments API
The deployments API from Trajectory — 8 operation(s) for deployments.
The deployments API from Trajectory — 8 operation(s) for deployments.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/trajectory:trajectory-deployments-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Trajectory Deployments 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.
tags:
- name: Deployments
paths:
/api/v1/deploy/{deployment_id}/chat/completions:
post:
tags:
- Deployments
summary: Deployment Chat Completion
description: Test this exact deployment without changing the slug's production target.
operationId: createDeploymentChatCompletion
security:
- InferenceAuthorization: []
parameters:
- name: deployment_id
in: path
required: true
schema:
type: string
title: Deployment Id
- name: X-Trajectory-Id
in: header
required: true
schema:
type: string
minLength: 1
title: X-Trajectory-Id
- name: X-API-Key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Api-Key
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionResponse'
text/event-stream:
schema:
$ref: '#/components/schemas/ChatCompletionChunk'
x-trajectory-visibility: public
x-trajectory-streaming-response:
param_discriminator: stream
response_schema:
$ref: '#/components/schemas/ChatCompletionChunk'
/api/v1/deploy:
get:
tags:
- Deployments
summary: List Deployments Route
operationId: listDeployments
parameters:
- name: status
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/DeploymentLifecycleStatus'
- type: 'null'
title: Status
- name: cursor
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Cursor
- name: limit
in: query
required: false
schema:
type: integer
maximum: 200
minimum: 1
default: 25
title: Limit
- name: sort
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sort
- name: order
in: query
required: false
schema:
enum:
- asc
- desc
type: string
default: desc
title: Order
- name: search
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Search
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ListDeploymentsResponse'
x-trajectory-visibility: public
post:
tags:
- Deployments
summary: Start
description: Serve a committed checkpoint through Model Endpoint.
operationId: startDeployModel
parameters:
- name: Idempotency-Key
in: header
required: false
schema:
type: string
minLength: 1
maxLength: 256
title: Idempotency-Key
description: Optional. Without a key, repeated submissions are treated as separate actions. A blank or over-long key is rejected. Reuse this key when retrying a submission; the SDK generates one per call and reuses it across automatic retries.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StartDeployRequest'
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StartDeployResponse'
x-trajectory-visibility: public
/api/v1/deploy/summary:
get:
tags:
- Deployments
summary: Summary
operationId: summarizeDeployments
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DeploymentsSummary'
x-trajectory-visibility: public
/api/v1/deploy/{deployment_id}/retry:
post:
tags:
- Deployments
summary: Retry Deployment Route
description: Retry a failed or cancelled deployment in place after cleanup. Keeps its deployment ID, test model slug, checkpoint, and saved configuration.
operationId: retryDeployment
parameters:
- name: deployment_id
in: path
required: true
schema:
type: string
title: Deployment Id
- name: Idempotency-Key
in: header
required: false
schema:
type: string
minLength: 1
maxLength: 256
title: Idempotency-Key
description: Optional. Without a key, repeated submissions are treated as separate actions. A blank or over-long key is rejected. Reuse this key when retrying a submission; the SDK generates one per call and reuses it across automatic retries.
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StartDeployResponse'
x-trajectory-visibility: public
/api/v1/deploy/{deployment_id}/cancel:
post:
tags:
- Deployments
summary: Cancel Deployment Route
operationId: cancelDeployment
parameters:
- name: deployment_id
in: path
required: true
schema:
type: string
title: Deployment Id
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CancelDeploymentResponse'
x-trajectory-visibility: public
/api/v1/deploy/{deployment_id}:
get:
tags:
- Deployments
summary: Get Deployment Route
operationId: getDeployment
parameters:
- name: deployment_id
in: path
required: true
schema:
type: string
title: Deployment Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Deployment'
x-trajectory-visibility: public
delete:
tags:
- Deployments
summary: Undeploy
description: Delete a deployment and its Model Endpoint resources.
operationId: undeployDeployment
parameters:
- name: deployment_id
in: path
required: true
schema:
type: string
title: Deployment Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UndeployResponse'
x-trajectory-visibility: public
/api/v1/deploy/{deployment_id}/promote:
post:
tags:
- Deployments
summary: Promote
description: Make a deployed deployment the active target for its slug.
operationId: promoteDeployment
parameters:
- name: deployment_id
in: path
required: true
schema:
type: string
title: Deployment Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PromoteRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PromoteResponse'
x-trajectory-visibility: public
/api/v1/deploy/{deployment_id}/unpromote:
post:
tags:
- Deployments
summary: Unpromote
description: Clear a deployment's active flag so its slug serves nothing.
operationId: unpromoteDeployment
parameters:
- name: deployment_id
in: path
required: true
schema:
type: string
title: Deployment Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PromoteResponse'
x-trajectory-visibility: public
components:
schemas:
CompletionTokensDetails:
properties:
accepted_prediction_tokens:
anyOf:
- type: integer
- type: 'null'
title: Accepted Prediction Tokens
audio_tokens:
anyOf:
- type: integer
- type: 'null'
title: Audio Tokens
reasoning_tokens:
anyOf:
- type: integer
- type: 'null'
title: Reasoning Tokens
rejected_prediction_tokens:
anyOf:
- type: integer
- type: 'null'
title: Rejected Prediction Tokens
additionalProperties: true
type: object
title: CompletionTokensDetails
DeploymentRole:
type: string
enum:
- production
- test
title: DeploymentRole
DeploymentLifecycleStatus:
type: string
enum:
- PENDING
- DEPLOYING
- DEPLOYED
- FAILED
- CANCELLING
- CANCELLED
title: DeploymentLifecycleStatus
description: Spanner deployment row status.
PromoteResponse:
properties:
deployment_id:
type: string
title: Deployment Id
is_active:
type: boolean
title: Is Active
type: object
required:
- deployment_id
- is_active
title: PromoteResponse
ModelEndpointConfig:
properties:
model_path:
type: string
title: Model Path
max_output_tokens_per_step:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Max Output Tokens Per Step
max_response_chars_per_tool_call:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Max Response Chars Per Tool Call
max_context_tokens:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Max Context Tokens
max_output_tokens:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Max Output Tokens
max_turns_per_trajectory:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Max Turns Per Trajectory
default: 125
temperature_override:
anyOf:
- type: number
maximum: 2.0
minimum: 0.0
- type: 'null'
title: Temperature Override
disable_thinking:
anyOf:
- type: boolean
- type: 'null'
title: Disable Thinking
reasoning_effort:
anyOf:
- type: string
enum:
- none
- minimal
- low
- medium
- high
- xhigh
- max
- type: 'null'
title: Reasoning Effort
tokenizer_path:
anyOf:
- type: string
- type: 'null'
title: Tokenizer Path
top_p_override:
anyOf:
- type: number
maximum: 1.0
minimum: 0.0
- type: 'null'
title: Top P Override
top_k_override:
anyOf:
- type: integer
minimum: -1.0
- type: 'null'
title: Top K Override
additionalProperties: false
type: object
required:
- model_path
title: ModelEndpointConfig
PromptTokensDetails:
properties:
audio_tokens:
anyOf:
- type: integer
- type: 'null'
title: Audio Tokens
cached_tokens:
anyOf:
- type: integer
- type: 'null'
title: Cached Tokens
additionalProperties: true
type: object
title: PromptTokensDetails
ChatCompletionResponseFunction:
properties:
name:
type: string
title: Name
arguments:
type: string
title: Arguments
additionalProperties: true
type: object
required:
- name
- arguments
title: ChatCompletionResponseFunction
ChatCompletionChunkToolCall:
additionalProperties: true
properties:
index:
title: Index
type: integer
id:
anyOf:
- type: string
- type: 'null'
title: Id
function:
anyOf:
- $ref: '#/components/schemas/ChatCompletionChunkFunction'
- type: 'null'
type:
anyOf:
- const: function
type: string
- type: 'null'
title: Type
required:
- index
title: ChatCompletionChunkToolCall
type: object
ChatCompletionChoiceLogprobs:
properties:
content:
anyOf:
- items:
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
type: array
- type: 'null'
title: Content
refusal:
anyOf:
- items:
$ref: '#/components/schemas/ChatCompletionTokenLogprob'
type: array
- type: 'null'
title: Refusal
additionalProperties: true
type: object
title: ChatCompletionChoiceLogprobs
ChatCompletionChoice:
properties:
index:
type: integer
title: Index
message:
$ref: '#/components/schemas/ChatCompletionResponseMessage'
finish_reason:
anyOf:
- type: string
- type: 'null'
title: Finish Reason
logprobs:
anyOf:
- $ref: '#/components/schemas/ChatCompletionChoiceLogprobs'
- type: 'null'
additionalProperties: true
type: object
required:
- index
- message
title: ChatCompletionChoice
ListDeploymentsResponse:
properties:
items:
items:
$ref: '#/components/schemas/Deployment'
type: array
title: Items
description: Deployments on this page, newest first.
next_cursor:
anyOf:
- type: string
- type: 'null'
title: Next Cursor
description: Cursor for the next page; null on the last page.
has_more:
type: boolean
title: Has More
description: True when another page is available.
type: object
required:
- items
- has_more
title: ListDeploymentsResponse
DeploymentsSummary:
properties:
total:
type: integer
title: Total
description: All deployments in the organization.
pending:
type: integer
title: Pending
description: Deployments awaiting provisioning.
deploying:
type: integer
title: Deploying
description: Deployments provisioning their Model Endpoint.
deployed:
type: integer
title: Deployed
description: Deployments that finished deploying.
failed:
type: integer
title: Failed
description: Deployments that failed to become ready.
active:
type: integer
title: Active
description: Deployments currently answering for their slug.
cancelling:
type: integer
title: Cancelling
description: Deployments awaiting confirmed cleanup.
default: 0
cancelled:
type: integer
title: Cancelled
description: Deployments cancelled before publication.
default: 0
type: object
required:
- total
- pending
- deploying
- deployed
- failed
- active
title: DeploymentsSummary
description: Lifecycle counts for the Deployments toolbar, kept off the paginated list.
PromoteRequest:
properties:
expected_deployment_id:
anyOf:
- type: string
- type: 'null'
title: Expected Deployment Id
description: Expected current production target; null for initial promotion.
additionalProperties: false
type: object
required:
- expected_deployment_id
title: PromoteRequest
ChatCompletionChunkChoice:
additionalProperties: true
properties:
index:
title: Index
type: integer
delta:
$ref: '#/components/schemas/ChatCompletionChunkDelta'
finish_reason:
anyOf:
- type: string
- type: 'null'
title: Finish Reason
logprobs:
anyOf:
- $ref: '#/components/schemas/ChatCompletionChoiceLogprobs'
- type: 'null'
required:
- index
- delta
title: ChatCompletionChunkChoice
type: object
ChatMessage:
properties:
role:
type: string
title: Role
content:
anyOf:
- type: string
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
title: Content
additionalProperties: true
type: object
required:
- role
title: ChatMessage
ChatCompletionRequest:
properties:
model:
type: string
title: Model
messages:
items:
$ref: '#/components/schemas/ChatMessage'
type: array
title: Messages
stream:
anyOf:
- type: boolean
- type: 'null'
title: Stream
default: false
disable_thinking:
anyOf:
- type: boolean
- type: 'null'
title: Disable Thinking
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
max_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Tokens
description: Maximum generated tokens, including reasoning tokens when emitted.
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
additionalProperties: true
type: object
required:
- model
- messages
title: ChatCompletionRequest
ChatCompletionTokenLogprob:
properties:
token:
type: string
title: Token
logprob:
type: number
title: Logprob
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
top_logprobs:
items:
$ref: '#/components/schemas/ChatCompletionTokenTopLogprob'
type: array
title: Top Logprobs
additionalProperties: true
type: object
required:
- token
- logprob
- top_logprobs
title: ChatCompletionTokenLogprob
StartDeployResponse:
properties:
deployment_id:
type: string
title: Deployment Id
role:
$ref: '#/components/schemas/DeploymentRole'
type: object
required:
- deployment_id
- role
title: StartDeployResponse
AsyncFailure:
properties:
type:
type: string
title: Type
description: Stable category used for exception mapping.
code:
type: string
title: Code
description: Stable programmatic reason for the asynchronous failure.
message:
type: string
title: Message
description: Human-readable explanation for this failure occurrence.
context:
additionalProperties: true
type: object
title: Context
description: Machine-readable values specific to this failure code.
type: object
required:
- type
- code
- message
title: AsyncFailure
ChatCompletionChunk:
additionalProperties: true
properties:
id:
title: Id
type: string
object:
title: Object
type: string
created:
title: Created
type: integer
model:
title: Model
type: string
choices:
items:
$ref: '#/components/schemas/ChatCompletionChunkChoice'
title: Choices
type: array
usage:
anyOf:
- $ref: '#/components/schemas/Usage'
- type: 'null'
service_tier:
anyOf:
- type: string
- type: 'null'
title: Service Tier
system_fingerprint:
anyOf:
- type: string
- type: 'null'
title: System Fingerprint
required:
- id
- object
- created
- model
- choices
title: ChatCompletionChunk
type: object
UndeployResponse:
properties:
deployment_id:
type: string
title: Deployment Id
row_deleted:
type: boolean
title: Row Deleted
type: object
required:
- deployment_id
- row_deleted
title: UndeployResponse
CancelDeploymentResponse:
properties:
deployment_id:
type: string
title: Deployment Id
status:
$ref: '#/components/schemas/DeploymentLifecycleStatus'
type: object
required:
- deployment_id
- status
title: CancelDeploymentResponse
ChatCompletionChunkDelta:
additionalProperties: true
properties:
role:
anyOf:
- type: string
- type: 'null'
title: Role
content:
anyOf:
- type: string
- type: 'null'
title: Content
refusal:
anyOf:
- type: string
- type: 'null'
title: Refusal
function_call:
anyOf:
- $ref: '#/components/schemas/ChatCompletionChunkFunction'
- type: 'null'
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ChatCompletionChunkToolCall'
type: array
- type: 'null'
title: Tool Calls
title: ChatCompletionChunkDelta
type: object
ChatCompletionResponseMessage:
properties:
role:
type: string
title: Role
content:
anyOf:
- type: string
- type: 'null'
title: Content
tool_calls:
anyOf:
- items:
$ref: '#/components/schemas/ChatCompletionResponseToolCall'
type: array
- type: 'null'
title: Tool Calls
function_call:
anyOf:
- $ref: '#/components/schemas/ChatCompletionResponseFunction'
- type: 'null'
additionalProperties: true
type: object
required:
- role
- content
title: ChatCompletionResponseMessage
Usage:
properties:
prompt_tokens:
type: integer
title: Prompt Tokens
completion_tokens:
type: integer
title: Completion Tokens
total_tokens:
type: integer
title: Total Tokens
completion_tokens_details:
anyOf:
- $ref: '#/components/schemas/CompletionTokensDetails'
- type: 'null'
prompt_tokens_details:
anyOf:
- $ref: '#/components/schemas/PromptTokensDetails'
- type: 'null'
additionalProperties: true
type: object
required:
- prompt_tokens
- completion_tokens
- total_tokens
title: Usage
ChatCompletionTokenTopLogprob:
properties:
token:
type: string
title: Token
logprob:
type: number
title: Logprob
bytes:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Bytes
additionalProperties: true
type: object
required:
- token
- logprob
title: ChatCompletionTokenTopLogprob
ChatCompletionResponse:
properties:
id:
type: string
title: Id
object:
type: string
title: Object
created:
type: integer
title: Created
model:
type: string
title: Model
choices:
items:
$ref: '#/components/schemas/ChatCompletionChoice'
type: array
title: Choices
usage:
anyOf:
- $ref: '#/components/schemas/Usage'
- type: 'null'
additionalProperties: true
type: object
required:
- id
- object
- created
- model
- choices
title: ChatCompletionResponse
StartDeployRequest:
properties:
checkpoint_id:
type: string
title: Checkpoint Id
test_model_slug:
type: string
title: Test Model Slug
agent_id:
anyOf:
- type: string
maxLength: 64
minLength: 1
- type: 'null'
title: Agent Id
description: Owning agent; inferred from the checkpoint when omitted.
model_endpoint_config:
anyOf:
- $ref: '#/components/schemas/ModelEndpointConfig'
- type: 'null'
description: Model and tokenizer identity for the deployment; defaults to the originating Training Service run. Sampling overrides and training limits are cleared.
additionalProperties: false
type: object
required:
- checkpoint_id
- test_model_slug
title: StartDeployRequest
Deployment:
properties:
deployment_id:
type: string
title: Deployment Id
description: Deployment row id.
agent_id:
anyOf:
- type: string
- type: 'null'
title: Agent Id
description: Owning agent; null for unassigned legacy deployments.
production_model_slug:
anyOf:
- type: string
- type: 'null'
title: Production Model Slug
description: The owning agent production model slug; null until configured.
agent_name:
anyOf:
- type: string
- type: 'null'
title: Agent Name
description: Owning agent display name; null for a deleted agent.
test_model_slug:
type: string
title: Test Model Slug
description: Exact test model slug owned by this deployment.
model_slug_id:
type: string
title: Model Slug Id
description: ID of this deployment test model slug row.
status:
$ref: '#/components/schemas/DeploymentLifecycleStatus'
description: Deployment lifecycle state.
role:
$ref: '#/components/schemas/DeploymentRole'
description: Whether this is the production or a test deployment.
is_active:
type: boolean
title: Is Active
description: True when this deployment currently answers for the slug.
checkpoint_id:
type: string
title: Checkpoint Id
description: Trajectory checkpoint selected when the deployment was created.
model_endpoint_id:
anyOf:
- type: string
- type: 'null'
title: Model Endpoint Id
description: Model Endpoint serving this deployment.
base_model_slug:
type: string
title: Base Model Slug
description: Base model of the source checkpoint.
checkpoint_step:
type: integer
title: Checkpoint Step
description: Training step of the source checkpoint.
created_by:
anyOf:
- type: string
- type: 'null'
title: Created By
description: Email of the user who requested this deployment.
completed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Completed At
description: When the deployment first became DEPLOYED; unlike updated_at, later promote/demote transitions never overwrite this.
created_at:
type: string
format: date-time
title: Created At
description: When the deployment was requested.
updated_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Updated At
description: Last lifecycle transition; null until the row first moves.
failure:
anyOf:
- $ref: '#/components/schemas/AsyncFailure'
- type: 'null'
description: Structured failure when status is FAILED.
type: object
required:
- deployment_id
- test_model_slug
- model_slug_id
- status
- role
- is_active
- checkpoint_id
- base_model_slug
- checkpoint_step
- created_at
title: Deployment
description: Spanner-backed deployment lifecycle row for the platform UI.
ChatCompletionResponseToolCall:
properties:
id:
type: string
title: Id
type:
type: string
const: function
title: Type
function:
$ref: '#/components/schemas/ChatCompletionResponseFunction'
additionalProperties: true
type: object
required:
- id
- type
- function
title: ChatCompletionResponseToolCall
ChatCompletionChunkFunction:
additionalProperties: true
properties:
arguments:
anyOf:
- type: string
- type: 'null'
title: Arguments
name:
anyOf:
- type: string
- type: 'null'
title: Name
title: ChatCompletionChunkFunction
type: object
securitySchemes:
TrajectoryAccessToken:
type: http
description: Short-lived token scoped to one rollout trajectory
scheme: bearer
InferenceAuthorization:
type: http
scheme: bearer