Create Replica
Creates a new replica in your organization and sends an initial message to the coding agent. The workspace and agent are initialized asynchronously.
Authorizations
API key authentication. Obtain your API key from the Replicas dashboard under Settings > API Keys.
Headers
Optional dated API version. When omitted, the request blocks until the workspace reaches active and the response includes the populated engine details (legacy behavior). When set to 2026-05-17, the request returns immediately with a preparing workspace; the initial message is still delivered to the agent in the background. See the API Versioning section for details.
2026-05-17 Body
Request body for creating a new replica
Human-readable name for the replica. Must not contain whitespace.
^\S+$Initial message to send to the coding agent
ID of the environment to use. The server derives the repository or repository set from the environment binding. Required unless repository_set_id or repository_ids is provided for backwards compatibility.
Deprecated. Use environment_id instead. Provided for backwards compatibility: the server resolves the first environment bound to this repository set.
Deprecated. Use environment_id instead. Provided for backwards compatibility: the server resolves the first environment bound to one of the given repositories.
Coding agent to use
claude, codex, cursor, opencode Model to use for the coding agent
Images to attach to the initial message
Lifecycle policy for the replica
default, delete_when_done, delete_after_inactivity Workspace behavior configuration. Missing capabilities and preferences default to disabled.
Whether to run the initial message in plan mode. Leading /plan in the message is also detected and stripped.
Whether to set the initial message as the active Codex goal. Leading /goal in the message is also detected and stripped.
Whether to run the initial message in fast mode. Leading /fast in the message is also detected and stripped.
Thinking/reasoning level. Controls how much effort the agent puts into reasoning. Falls back to provider default when omitted (Claude default: high, Codex default: medium, Cursor default: medium, Opencode default: medium).
low, medium, high, max Callback target for replica.ready, replica.turn_completed, replica.deleted, and replica.error events. Pass a bare URL string or { url, secret }; with a secret the platform sets X-Replicas-Signature: sha256=<hex HMAC> on every delivery.
Compute size for this replica. small (2 vCPU, 8 GB memory, 20 GB disk) bills at $0.008/min; large (4 vCPU, 16 GB memory, 32 GB disk) bills at $0.016/min. Omit to inherit the org's sandbox tier and the legacy $0.0166/min rate.
small, large Response
Replica created successfully
A replica item in list responses