Start in three steps
- The shop owner creates an integration in Settings → API integrations, chooses its permissions, and gives you the client ID and client secret.
- Trade the client ID and secret for an access token. It lasts 15 minutes; ask for another when it expires. There is no refresh token — your client secret is all you need to get a new one.
curl -s -u "$CLIENT_ID:$CLIENT_SECRET" -X POST https://api.tekomata.com/v1/token # {"access_token":"tka_…","token_type":"Bearer","expires_in":900} - In the API reference tab, click Authorize and paste the access token, open an endpoint, click Try it out, fill in its fields, then Execute. Open the API reference →
Trying calls on this page uses the real API. Every post or document read that succeeds is taken off the shop's credit — AI tokens at cost, plus the plan's base — and the reply's charged field says how much.
What you can do
Read documents (OCR)
AI reads a photo or PDF of a receipt, invoice, or PO into data that matches a document type the shop created. You can pick the AI vendor and model for each read, and see its price per page.
Blog articles with AI
Send a topic, and AI writes a full article with a title and sections. You can wait for it directly, or let it run in the background and be told by webhook.
Images with AI
Send a prompt, and AI draws it in 1:1, 4:5, or 9:16. It runs in the background and you are told by webhook.
Balance & top-ups
See the shop's balance and plan, request a top-up, report the transfer, then hear the decision by webhook.
Basics
- API address: https://api.tekomata.com, everything under /v1. JSON in, JSON out, UTF-8.
- One integration belongs to one shop. Every call reads and writes that shop's data only; there is no parameter to pick a shop.
- Money is in rupiah, never a plain decimal fraction (float). Balance, prices, limits and "charged" are whole numbers; "amount" and "credited" on a top-up are decimal strings, for example "100000.0000".
- Every AI feature is paid from the shop's Tekomata balance: the cost is in rupiah, at the prices on tekomata.com/pricing, and the API response states the total in "charged". A request refused before the AI is asked is not charged.
- AI work runs in the background: the call answers 202 with an id, then a webhook tells you when it is done. Asking repeatedly (polling) still works, but webhooks save your request limit. The only call that waits is POST /v1/blog/generate: it answers 200 with the article.
- Send an "Idempotency-Key" header (for example a new UUID per request) on every call that writes. Repeated with the same key within at least 24 hours, the response is the first response (header Idempotent-Replayed: true): nothing is read, written, or charged twice.
- Tag reads, articles, and images with "clientReference" (your own id, up to 200 characters). It comes back in the response and in the webhook, and reads can be searched by it: GET …/runs?clientReference=….
- API changes are recorded at tekomata.com/developers/changelog. New fields can appear at any time; anything removed or renamed, and AI models switched off or repriced, are announced there at least 30 days before.