Postprompttemplatestats

以 Markdown 格式查看
Batch prompt-template statistics for a calendar period. **Body:** `dateFrom`, `dateTo`, and non-empty `prompt_ids` array. Empty or missing `prompt_ids` -> `40050`. **Success `data`:** `{ "stats": { "<prompt_id>": { "total_calls", "cost_sum", "call_sparkline": [{ "date", "value" }] } } } }`.

请求头

Authorizationstring可选

Optional. Bearer JWT, Virtual Key, or PAT. Server also accepts Cookie alephant_token; not modeled as a header here.

X-Workspace-Idstring可选

Optional in the spec; required for authenticated analytics. Omit for unauthenticated GET /v1/analytics/health.

请求

This endpoint expects an object.
dateFromstring必需

Inclusive start YYYY-MM-DD.

dateTostring必需

Inclusive end YYYY-MM-DD.

prompt_idslist of strings必需

Non-empty prompt template id list.

响应

codeinteger
messagestring
dataany