Skip to main content
POST
/
v1
/
replica
Create Replica
curl --request POST \
  --url https://api.replicas.dev/v1/replica \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "message": "<string>",
  "repository_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "repository_set_id": "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"
}
'
{
  "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>"
      }
    ]
  }
}

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

repository_ids
string<uuid>[]

IDs of repositories to include. Mutually exclusive with repository_set_id.

repository_set_id
string<uuid>

ID of a repository set to use. Mutually exclusive with repository_ids.

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

Response

Replica created successfully

replica
object
required

A replica item in list responses