Chat

Send Chat Prompt

Send a prompt to an existing chat session. The session begins generating a response asynchronously — poll GET /chat-v1/sessions/{id} with include_messages=true to retrieve the response when the session returns to active status.


POST /chat-v1/sessions/{session_id}/prompt

Path Parameters

ParameterTypeDescription
session_idintegerThe session identifier

Request Body

FieldTypeRequiredDescription
contentstringyesThe prompt text. Cannot be empty.
tool_settingsobjectnoOptional tool settings for this prompt. Supports source_filters and web_search_enabled.

NOTE

  • Returns 400 if content is missing or empty; 404 if the session does not exist or does not belong to the user.
  • The prompt is created synchronously and returned immediately. Generation runs in the background — the session transitions finding_sourcesgenerating_responseactive.

Request

POST https://premium.aiera.com/api/chat-v1/sessions/2227/prompt
Content-Type: application/json

{
  "content": "How does this compare to AMD price targets?"
}

Response (201)

{
  "id": 20713,
  "session_id": 2227,
  "message_type": "prompt",
  "content": "How does this compare to AMD price targets?",
  "ordinal_id": null,
  "runner_version": null,
  "tool_settings": null,
  "user_id": 9846,
  "created_at": "2026-04-29T20:52:31Z",
  "updated_at": "2026-04-29T20:52:31Z"
}

Response (400)

{
  "error": "content is required"
}

Code Samples

Bash

curl --request POST \
  --url 'https://premium.aiera.com/api/chat-v1/sessions/2227/prompt' \
  --header 'X-API-Key: your-rest-api-key' \
  --header 'Content-Type: application/json' \
  --data '{"content": "How does this compare to AMD price targets?"}'

Python

import requests
requests.post(
    "https://premium.aiera.com/api/chat-v1/sessions/2227/prompt",
    headers={"X-API-Key": "your-rest-api-key"},
    json={"content": "How does this compare to AMD price targets?"},
)
Previous
Delete Session