CognitiveX Docs
API

POST /api/chat/regenerate

Regenerate

POST /api/chat/regenerate

Regenerate

Authentication: Authorization: Bearer <key> or X-API-Key: <key>. Create keys at developers.cognitivx.io/keys.

Parameters

NameInTypeRequiredDescription
X-Org-IDheaderstring | nullNo-

Request body

A JSON request body is required.

FieldTypeRequiredDescription
messagestringYes-
providerstringNoDefaults to "openrouter".
session_idstringYes-
file_idsstring[]NoDefaults to [].
content_blocksContentBlockRequest[]NoDefaults to [].
toolsstring[]NoDefaults to [].
url_snapshot_hashstring | nullNo-
deepbooleanNoDefaults to false.
depth"quick" | "deep" | "sage" | nullNoOne of: quick, deep, sage.
existing_reflex_idstring | nullNo-
geo_latnumber | nullNo-
geo_lonnumber | nullNo-

Example request

curl -X POST https://api.cognitivx.io/api/chat/regenerate \
  -H "Authorization: Bearer icog_..." \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Parsa prefers limit/offset pagination",
    "provider": "openrouter",
    "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "file_ids": [],
    "content_blocks": [],
    "tools": [],
    "url_snapshot_hash": "https://example.com",
    "deep": false,
    "depth": "quick",
    "existing_reflex_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "geo_lat": null,
    "geo_lon": null
  }'

Example response

200 application/json

null

Responses

StatusDescription
200Success. Returns the response body shown below.
422Request validation failed. detail lists each offending field.