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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Org-ID | header | string | null | No | - |
Request body
A JSON request body is required.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | - |
provider | string | No | Defaults to "openrouter". |
session_id | string | Yes | - |
file_ids | string[] | No | Defaults to []. |
content_blocks | ContentBlockRequest[] | No | Defaults to []. |
tools | string[] | No | Defaults to []. |
url_snapshot_hash | string | null | No | - |
deep | boolean | No | Defaults to false. |
depth | "quick" | "deep" | "sage" | null | No | One of: quick, deep, sage. |
existing_reflex_id | string | null | No | - |
geo_lat | number | null | No | - |
geo_lon | number | null | No | - |
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
nullResponses
| Status | Description |
|---|---|
200 | Success. Returns the response body shown below. |
422 | Request validation failed. detail lists each offending field. |