Deployments.ai Docs
Runtime

Create a preview from an unpublished agent manifest

POST /v1/previews · SDK createPreview · CLI deployments preview create

POST
/v1/previews

Requires runs:write.

Authorization

headerAuthorizationBearer <token>

Opaque bearer credential scoped to one service account and tenant.

Header Parameters

x-deployments-environment?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-organization?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string

Must contain 1–256 UTF-8 bytes with no surrounding whitespace or control characters (U+0000–U+001F and U+007F); maxLength is only a character-count approximation.

Match^(?!\s)(?!.*\s$)[^\u0000-\u001F\u007F]+$
Length1 <= length <= 256

Request Body

application/json
  1. body
fromAgentDeploymentId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
manifest*
runtimeConfig?
ttlSeconds?integer
Range60 <= value <= 604800

Response Body

PreviewResponse

application/json
  1. response
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*number|||
environmentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
agentName*string
contentHash*string
createdBy*
expiredAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
expiresAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
object*"preview"
Value in"preview"
runtimeConfigFromAgentDeploymentId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
status*string
Value in"active""expired"
curl -X POST "https://example.com/v1/previews" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "manifest": {      "apiVersion": "agents.deployments.ai/v1",      "kind": "Agent",      "metadata": {        "key": "string",        "name": "string",        "version": "string"      },      "spec": {        "instructions": "string",        "model": {          "id": "string"        },        "sandbox": {          "mode": "none"        }      }    }  }'
{  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "environmentId": "string",  "organizationId": "string",  "projectId": "string",  "agentName": "string",  "contentHash": "string",  "createdBy": {    "id": "string",    "type": "agent"  },  "expiredAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "id": "string",  "object": "preview",  "runtimeConfigFromAgentDeploymentId": "string",  "status": "active"}