Start an agent session
POST
/api/v1/sessionsThe prompt is its first turn. When every slot is taken it waits in line, and queuedAt is its place. Needs agents.manage.
En esta página
Cuerpo
| Campo | Tipo | Descripción |
|---|---|---|
promptobligatorio | string |
|
repo | string |
|
title | string |
|
agent | string |
|
baseRef | string |
|
model | string |
|
Esquema JSON
{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"repo": {
"type": "string",
"maxLength": 140,
"default": ""
},
"title": {
"type": "string",
"maxLength": 80,
"default": ""
},
"agent": {
"type": "string",
"minLength": 1,
"maxLength": 40,
"default": "claude"
},
"baseRef": {
"type": "string",
"maxLength": 200,
"default": ""
},
"model": {
"type": "string",
"maxLength": 265,
"default": ""
}
},
"required": [
"prompt"
],
"additionalProperties": false
}Petición de ejemplo
curl -X POST "https://polaris.example.com/api/v1/sessions" \
-H "Authorization: Bearer $POLARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "string",
"repo": "",
"title": "",
"agent": "claude",
"baseRef": "",
"model": ""
}'Respuestas
| Estado | Qué es |
|---|---|
201 | Created |
También puede dar los errores comunes 400, 401, 403, 404, 429. Ver errores comunes