Skip to main content
POST
/
v1
/
replica
Create Replica
curl --request POST \
  --url https://api.tryreplicas.com/v1/replica \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "message": "<string>",
  "environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "repository_set_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "repository_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "coding_agent": "claude",
  "model": "<string>",
  "images": [
    {
      "type": "<string>",
      "source": {
        "type": "<string>",
        "media_type": "image/png",
        "data": "<string>"
      }
    }
  ],
  "lifecycle_policy": "default",
  "thinking_level": "low"
}
'
{
  "replica": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "status": "active",
    "source": "api",
    "created_at": "2023-11-07T05:31:56Z",
    "last_activity_at": "2023-11-07T05:31:56Z",
    "repositories": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "url": "<string>"
      }
    ],
    "pull_requests": [
      {
        "repository": "<string>",
        "number": 123,
        "url": "<string>"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.replicas.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication. Obtain your API key from the Replicas dashboard under Settings > API Keys.

Body

application/json

Request body for creating a new replica

name
string
required

Human-readable name for the replica. Must not contain whitespace.

Pattern: ^\S+$
message
string
required

Initial message to send to the coding agent

environment_id
string<uuid>

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.

repository_set_id
string<uuid>
deprecated

Deprecated. Use environment_id instead. Provided for backwards compatibility: the server resolves the first environment bound to this repository set.

repository_ids
string<uuid>[]
deprecated

Deprecated. Use environment_id instead. Provided for backwards compatibility: the server resolves the first environment bound to one of the given repositories.

coding_agent
enum<string>
default:claude

Coding agent to use

Available options:
claude,
codex
model
string

Model to use for the coding agent

images
object[]

Images to attach to the initial message

lifecycle_policy
enum<string>

Lifecycle policy for the replica

Available options:
default,
delete_when_done,
delete_after_inactivity
thinking_level
enum<string>

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).

Available options:
low,
medium,
high,
max

Response

Replica created successfully

replica
object
required

A replica item in list responses