Docs / Tools

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.

ToolStart itWhat to send
Check a linkPOST /v1/linkurl
Find docs and statsPOST /v1/docsquery
Read a PDFPOST /v1/pdffilename, data (the PDF as base64), instruction (optional)
Griot scriptPOST /v1/griottopic, role, language, length, audience
Thoth researchPOST /v1/researchsubject, focus (list), brief; add deep:true for the slower Soyombo mode
TranscriptionPOST /v1/transcribea 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

StatusMeaning
400Something required is missing.
401The key is not valid or has been revoked.
402Allowance used up. Wait for next month, or upgrade.
404No such job for this account.
409Open your workspace once, then try again.