API overview
Base URL, response shape, pagination, jobs, idempotency and errors for the MoltMentions API.
Base URL and format
Every route is under https://api.thrivestack.ai/v1. Requests and responses are JSON. Send Content-Type: application/json on every call with a body.
The API is in early access. Routes, limits and prices can change while it is. The pricing page always shows the current prices.
curl https://api.thrivestack.ai/v1/wallet/balance \
-H 'Authorization: Bearer tsk_live_YOUR_KEY'
Response shape
Every success response has the same envelope. A single result and a list differ only by data being an object or an array.
{
"data": { "id": "..." },
"meta": {
"request_id": "req_01HV...",
"cost": { "amount": "0.000000", "currency": "USD", "state": "charged" }
}
}
{
"data": [ { "id": "..." } ],
"page": { "limit": 25, "next_cursor": "...", "total_count": null },
"meta": { "request_id": "req_01HV...", "cost": { "amount": "0.000000", "currency": "USD", "state": "charged" } }
}
meta.request_idis also sent as theX-Request-Idheader. Quote it when you contact support.meta.costis what this call cost, as a decimal string in USD. A free call shows"0.000000". On a job that has just started,stateisestimated.- New fields can appear in
metaat any time. Ignore the ones you do not know.
Pagination
List routes take limit (default 25, maximum 100) and cursor. When page.next_cursor is not null, pass it back as cursor to get the next page. page.total_count can be null where counting is slow.
A cursor is opaque. Do not parse it. It works for 24 hours, only on the route and with the filters and limit it was issued for. Anything else returns 400 invalid_cursor.
Jobs: runs, audits and recommendations
Work that takes a while answers 202 Accepted with an id and a status URL. Poll the status URL until the status is a finished one. A refused or failed start is never charged.
| Start | Poll |
|---|---|
POST /v1/runs | GET /v1/runs/{id} |
POST /v1/audits | GET /v1/audits/{id} |
POST /v1/recommendations/content/generate | GET /v1/recommendations/content/jobs |
Idempotency
Routes that can charge you take an Idempotency-Key header. Send a new unique value for each action and reuse it only to retry that same action. A retry with the same key is answered from the stored response and charged once. Starting a run, an audit or a recommendation job requires the header.
Errors
Errors keep one shape on every route:
{
"error": {
"type": "invalid_request",
"code": "invalid_cursor",
"message": "The cursor does not match this request.",
"param": "cursor",
"request_id": "req_01HV..."
}
}
| Status | Meaning |
|---|---|
400 | Malformed or invalid input. param names the field. |
401 | No key, or a key that is unknown, expired or revoked. |
402 | Not enough credit or another billing block. The message says what the call costs. Nothing was charged. See Billing and balance. |
403 | The key may not use that brand. |
409 | The brand is not in a state where the call can go ahead, such as run_in_progress, brand_kit_not_ready or prompts_not_ready. Nothing was charged. |
429 | Too many requests. Wait Retry-After seconds. |
503 | A dependency is down. Nothing was done or charged. Retry after Retry-After seconds. |
All routes
Routes are grouped by what you are doing. Each group has its own page with parameters and examples.
| Group | Routes |
|---|---|
| Brand | Build and read the brand profile |
| Prompts | Generate, save, list and tag the prompts you track |
| Runs and answers | Measure the prompts on AI engines, read answers |
| Metrics and sources | Mention and citation rates, cited domains and URLs |
| Recommendations | Content fixes from a finished run |
| Audits | Check one site for AI readiness |
| Wallet | Balance, quote, ledger, usage and top-up |