One key for every tool
Run Check a link, Find docs, Read a PDF, Griot, Thoth and Transcription from code with the same API key as fact-checking.
Every tool uses the key you already have. Fact-checking answers straight away. The other tools take a little longer, so they start a job: you get a job number, then ask for the result until it is ready.
| Tool | Start it | What to send |
|---|---|---|
| Check a link | POST /v1/link | url |
| Find docs and stats | POST /v1/docs | query |
| Read a PDF | POST /v1/pdf | filename, data (the PDF as base64), instruction (optional) |
| Griot script | POST /v1/griot | topic, role, language, length, audience |
| Thoth research | POST /v1/research | subject, focus (list), brief; add deep:true for the slower Soyombo mode |
| Transcription | POST /v1/transcribe | a file, or a link; see below |
Jobs: start, then ask
curl -X POST https://api.chatniai.com/v1/docs \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"query":"Nigeria inflation rate 2025"}'
# answer (status 202): {"accepted":true,"job_id":"..."}
curl https://api.chatniai.com/v1/job/JOB_ID -H "Authorization: Bearer YOUR_KEY"
# repeat every 5 seconds until "state" is "done" (or "failed")
Transcription
Send the audio or video file as a form upload, or send a link. The answer comes back in the same call, with time stamps.
curl -X POST https://api.chatniai.com/v1/transcribe \
-H "Authorization: Bearer YOUR_KEY" \
-F offset=0 -F file=@interview.mp3
curl -X POST https://api.chatniai.com/v1/transcribe \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/audio.mp3","offset":0}'
Each piece can be up to 20 MB. For a long recording, cut it into pieces of about five minutes. Send the first piece, keep the ticket in the answer, and send each next piece with the header X-Transcribe-Ticket: TICKET and its offset in seconds. The whole recording counts as one use. The ticket works for 100 minutes.
Allowance
Each tool shares your monthly allowance of checks. On the free plan each tool can be started 5 times a month. A call that fails to start is not counted. When the trials are used you get status 402 with "error":"upgrade".
Errors
| Status | Meaning |
|---|---|
| 400 | Something required is missing. |
| 401 | The key is not valid or has been revoked. |
| 402 | Allowance used up. Wait for next month, or upgrade. |
| 404 | No such job for this account. |
| 409 | Open your workspace once, then try again. |