Skip to main content
POST
/
v1
/
threads
Create and start thread
curl --request POST \
  --url https://capy.ai/api/v1/threads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "<string>",
  "prompt": "<string>",
  "model": "auto",
  "repos": [
    {
      "repoFullName": "<string>",
      "branch": "<string>"
    }
  ],
  "attachmentUrls": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "projectId": "<string>",
  "title": "<string>",
  "status": "active",
  "createdAt": "<string>"
}

Authorizations

Authorization
string
header
required

API token (capy_xxxx). Generate at capy.ai/settings/tokens

Body

application/json
projectId
string
required
prompt
string
required
Minimum string length: 1
model
enum<string>
Available options:
auto,
claude-opus-4-6,
claude-opus-4-5,
claude-sonnet-4-6,
claude-sonnet-4-5,
claude-haiku-4-5,
gpt-5.4,
gpt-5.4-fast,
gpt-5.4-mini,
gpt-5.3-codex,
gpt-5.3-codex-fast,
gpt-5.2-codex,
gpt-5.2-codex-fast,
gpt-5.2,
gpt-5.2-fast,
gpt-5.2-pro,
gpt-5.1,
gpt-5.1-codex,
gpt-5.1-codex-max,
gpt-5,
gpt-5-codex,
gemini-3.1-pro,
gemini-3-pro,
gemini-3-flash,
grok-4.1-fast,
grok-4,
glm-5,
glm-5-turbo,
glm-4.7,
kimi-k2,
kimi-k2.5,
qwen-3-coder
repos
object[]
attachmentUrls
string<uri>[]

Response

Success

id
string
required
projectId
string
required
title
string | null
required
status
enum<string>
required
Available options:
active,
idle,
archived
createdAt
string
required