Skip to main content
GET
Get the version published to an environment

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

resourceType
enum<string>
required

Type of resource the environment belongs to. Only prompt (a canvas) is supported. Resource type an environment is attached to. Only canvases (prompt) are supported today.

Available options:
prompt
resourceId
string<uuid>
required

Canvas (prompt) ID.

envName
string
required

Environment name (production or a custom name). Environment name. Lowercase letters, digits and single hyphens between segments (no leading, trailing or consecutive hyphens), at most 64 characters. Leading/trailing whitespace is trimmed before validation.

production is the system environment every canvas has; it is the only reserved name you can publish to. The names production, promoted, latest and draft are reserved and cannot be used for custom environments, and a custom name cannot be a UUID.

The same rules apply to the environment_name field of POST /v2/chat/completions, which runs the version currently published to that environment of the given canvas_id (environment_name cannot be combined with version_id or application_id, and returns 404 when the environment does not exist or has no published version).

Maximum string length: 64
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example:

"staging"

Response

The published prompt version

A prompt version as returned by environment operations. variables and configuration follow the prompt-version schemas of the main API; they are typed loosely here.

id
string<uuid>
required
promptId
string<uuid>
required

Canvas ID

title
string
required
titleLocked
boolean
required
variables
object[]
required

Variable definitions of the version.

configuration
object | null
required

Model configuration (model, temperature, structured output, functions, ...).

promoted
boolean | null
required

true when this is the canvas' promoted version (the one served by production).

draft
boolean | null
required
originVersionId
string<uuid> | null
required

Version this one was duplicated from, if any.

workspaceId
string<uuid>
required
createdBy
string
required
updatedBy
string
required
createdAt
string<date-time> | null
required
updatedAt
string<date-time> | null
required
deletedAt
string<date-time> | null
required
messages
object[]
required
content
string | null
markdownContent
string | null
workflowSpec
string | null

Serialized workflow specification, when the version is a workflow.

graph
string | null

Serialized workflow graph, when the version is a workflow.

isWorkflow
boolean | null
deletedBy
string | null
message
object | null

First message of the version (messages[0]), kept for compatibility.

versionIndex
integer

1-based position of the version in the canvas history. Present on GET /environment/version; omitted when it cannot be computed.

promptCustomTags
string[]

Custom tags configured on the canvas.