Chakloon Platform
For developers: how to get a Chakloon API key, which APIs, free quotas and prices apply, how to stream Chacki answers, how to manage Chakloon Ads campaigns by API, and how to add Sign in with Chakloon to your site.
What it is
Chakloon Platform at platform.chakloon.net is the cabinet for developers. One API key, of the form ck_live_…, works for all Chakloon APIs. Requests go to api.chakloon.com. The documentation of every method is in the cabinet at platform.chakloon.net/docs.
Get an API key
- Open platform.chakloon.net and sign in with your Chakloon Passport.
- Create a key. Copy it at once: it is shown only once.
- Send the key with every request in the header Authorization: Bearer ck_live_….
Keep keys on your server. Never put a key into a web page or a mobile app, where anyone can read it. If a key may have leaked, revoke it in the cabinet and create a new one.
APIs and free quotas
| API | What it gives | Free quota |
|---|---|---|
| Weather | current weather, hourly and daily forecast, warnings and astronomy for a point or a place | 1 000 requests a day |
| Search | web and news results from the Chakloon Net index in 28 languages | 2 000 requests a month |
| Suggest | query suggestions while the user types | 20 000 requests a month |
| Chacki answers | an answer from Chacki that can use Chakloon tools: web search, fresh news and weather | none, paid from 0.03 € an answer |
| Links | short links on chak.uno with click statistics and QR codes; every address is checked against phishing and malware lists | 1 000 new links and 10 000 reads a month |
| Signatures | sending a PDF for signature in Chakloon Sign: signers sign in order, and you receive the signed PDF with a certificate page and a public verification page | 10 completed documents a month, then 0.15 € a document; cancelled and declined documents are free |
| Papers | a public record in Chakloon Papers, with a receipt, that a file existed: you send only its SHA-256 hash, and the file stays with you | 50 registrations a month, then 0.05 € each; checking a record is free |
| Legal | your sites in Chakloon Legal, their consent log, and a privacy policy, cookie policy, terms and imprint generated from your answers, which you publish in the cabinet; open legal.chakloon.net once first to create your workspace | reading is free, 2 € a generated set |
| Ads | your Chakloon Ads campaigns, reports and balance | 10 000 requests a day |
| Sign in with Chakloon | sign-in for your site with Chakloon Passport, OpenID Connect | free |
When a free quota is used up, the API answers with HTTP 402 and the code quota_exceeded until the next period. Each response carries headers that show your quota and how much of it is left. There is also a limit on requests per minute; when you reach it, the API answers with HTTP 429 and tells you when to retry.
Paid methods are charged from your Chakloon balance, Kassero, at the prices in the documentation and in the API Terms. Prices are shown without VAT; where VAT applies, it is shown before you pay. If your balance does not cover a paid call, the API answers with HTTP 402 and does not perform the call. If you need more than a free quota gives, write to support@chakloon.com and describe your project.
Weather data comes with an attribution of its sources in every response, and you must show it.
Chacki answers
The method POST /v1/chacki/answers gives your application an answer from Chacki. You send the conversation, up to 20 turns, and Chacki answers, using Chakloon tools where they help.
- Price: 0.03 € an answer of up to 2 000 output tokens and 3 tool calls; 0.01 € more for each further 1 000 output tokens, and 0.005 € more for each further tool call.
- Charging: before the answer an amount is held on your balance, and after it only the actual price is charged. An answer that fails is not charged.
- Labelling: the answer is generated by artificial intelligence. Label it as such wherever you show it. The Chacki AI Terms apply as well.
Streaming answers
Set stream: true in the request, and the answer comes as server-sent events, so you can show the text while it is being written:
- start: the answer has begun, with its identifier;
- tool: Chacki uses one of the tools;
- delta: the next piece of text;
- done: the whole answer, with its sources and usage;
- charge: after done, the amount and the currency charged from your balance.
If something goes wrong, you receive the event error instead. You pay only for what was written: if your client closes the connection, the answer stops, and only the text written until then is charged. If an error occurs or the stream breaks before done, nothing is charged.
Ads API
The Ads API lets advertisers of Chakloon Ads follow and steer their campaigns from their own systems:
- Campaigns: GET /v1/ads/campaigns lists your campaigns, GET /v1/ads/campaigns/{id} returns one.
- Pause and resume: POST /v1/ads/campaigns/{id}/pause and /resume. Only a paused campaign that has passed moderation can be resumed.
- Reports: GET /v1/ads/reports gives impressions, clicks and spend for 1 to 365 days, 30 by default.
- Balance: GET /v1/ads/balance shows your advertising balance and spend.
The Ads API works with the same key as the other APIs and returns only the campaigns of the account that owns the key. It is free, up to 10 000 requests a day. Creating and editing campaigns and topping up the balance stay in the cabinet at chakloon.net/add, where every ad passes moderation before it is shown. The rules for ads are in the Advertising Policy and Advertiser Terms.
Sign in with Chakloon
Let people sign in to your site or app with their Chakloon Passport, free of charge.
- In the cabinet, create an app.
- Enter the addresses your users return to after sign-in, one per line. Use full https:// addresses; http://localhost is allowed for development.
- Copy the client ID and the client secret. The secret is shown only once.
- Connect your site with any OpenID Connect library. The address of the configuration is in the documentation.
After sign-in you receive a stable user ID, the Chakloon handle, the name, the e-mail address and whether it is verified. You are responsible for the data of your users that you receive this way.
Rules and where to write
The conditions of use, acceptable use and data processing are in the API Terms, together with the general Terms of Service and Privacy Policy. For the Ads API the Advertising Policy and Advertiser Terms apply as well. We announce changes that break existing integrations, and the end of an API version, in advance, as described in the API Terms.
- Help with keys, quotas and integration: support@chakloon.com.
- Abuse of the API by someone else's key: abuse@chakloon.com.