Skip to content

Prompt an agent session

POST/api/v1/sessions/{id}/prompt

Needs an API key in the Authorization header.

On this page

Parameters

FieldInTypeDescription
idrequiredpathstring
A session id
  • format: uuid

Request body

FieldTypeDescription
textrequiredstring
  • min length: 1
  • max length: 20000
JSON schema
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000
    }
  },
  "required": [
    "text"
  ],
  "additionalProperties": false
}

Example request

curl -X POST "https://polaris.example.com/api/v1/sessions/{id}/prompt" \
  -H "Authorization: Bearer $POLARIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "string"
}'

Responses

StatusMeaning
200OK

Can also answer the common errors 400, 401, 403, 404, 429. See common errors