Docs / API reference
POST /v1/check
Send text, get a verdict. Every field explained.
POST https://api.chatniai.com/v1/check
Headers
| Header | Value |
|---|---|
Authorization | Bearer pij_live_YOUR_KEY |
Content-Type | application/json |
Body
| Field | Type | Required | Meaning |
|---|---|---|---|
text | string | yes | The claim, post or paragraph. 1 to 8,000 characters. |
async | boolean | no | true: return a job ID at once (recommended). false or missing: wait for the answer on the same request, which can time out on long text. |
language | string | no | en, ha, ig, yo, pcm. Defaults to your workspace setting. |
user | string | no | Work email of the person who asked. Shows in your activity log. Max 200 characters. |
presentation_profile | string | no | professional or plain. Defaults to your workspace setting. |
tone | string | no | friendly, formal, news, casual, rhetorical or humorous. Wording only. Never changes a verdict. |
Examples
curl https://api.chatniai.com/v1/check \
-H "Authorization: Bearer pij_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"The CBN has raised the rate to 40%.","language":"en","user":"ada@yournewsroom.com","async":true}'
Async or not?
| async: true | async: false | |
|---|---|---|
| Reply | 202 straight away with a job ID | 200 with the full result, once ready |
| Best for | Anything real: articles, posts, batches | One short sentence while testing |
| Risk | None. Poll for the result. | The connection may time out at about 100 seconds |
CarefulAlways use
async: true in production. A full check can take several minutes and many networks cut a request that waits that long. That cut-off is the most common cause of a failed check.What counts toward your allowance
Only a request that returns 200 or 202. A 502 is not counted.