Docs / Start here

Quickstart

Sign in, make a key, send a request. About five minutes.

  1. Sign in with your work emailGo to the sign-in page. Use your organisation address (not Gmail, Yahoo or Outlook). We email you a 6-digit code. The first person from an organisation becomes the workspace owner.
  2. Create an API keyIn the dashboard open API keys, give it a label such as CMS, and click Create key. Copy it now. It is shown once.
  3. Send your first checkPaste this into a terminal. Replace the key. It uses async so it answers at once.
  4. Collect the resultUse the job_id from step 3 and ask for it every 10 to 15 seconds until state is done.

Step 3: send

curl https://api.chatniai.com/v1/check \
  -H "Authorization: Bearer pij_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Nigeria became independent in 1960.","async":true}'

You should see:

{
  "ok": true,
  "accepted": true,
  "status": 202,
  "state": "running",
  "job_id": "3f2b9c1e-7d54-4a0b-9d3e-5f1a2c8e6b10"
}

Step 4: collect

curl https://api.chatniai.com/v1/job/PASTE_JOB_ID_HERE \
  -H "Authorization: Bearer pij_live_YOUR_KEY"
1Sendasync: true2Job ID202 at once3Askevery 10-15 s4Donefull resultstill running: wait and ask againA long check never times out your request.
Send, receive a job ID, ask again until it is done.
Stuck?If something goes wrong, the troubleshooting page lists every common failure with its fix. A 401 means the key is wrong. A 402 means you have used your 100 free checks.