Skip to main content
POST
Create an environment

Authorizations

Authorization
string
header
required

Access token issued by WorkOS AuthKit.

Body

application/json
name
string
required

Display name of the new environment

Required string length: 1 - 100
prompt
string | null

A natural-language description of the scenario the whole environment represents. Every twin in it is seeded from this description while it is being provisioned.

Required string length: 1 - 4000
twins
CreateEnvironmentTwinRequest · object[] | null

Provider twins to provision in the environment. Omitted when the environment is started from a template, which holds them already.

Required array length: 1 - 25 elements
template
string<uuid> | null

A saved environment definition to start from, instead of listing twins. Its twins, their curated scenarios and their instructions are used as they were saved.

save_as_template
boolean
default:false

Also save this environment's definition, so another environment can be started from it later.

Response

Successful Response

id
string<uuid>
required
slug
string
required
name
string
required
status
string
required
twins
EnvironmentTwinResponse · object[]
required
created_at
string<date-time>
required
expires_at
string<date-time> | null