AnjomanBeta

API keys

Call Anjoman from a script, a server or an AI agent with one key. No wallet to manage: every call is paid from your account's balance.

Sign in to see your API keys.

Sign in

Quick start

Put your key where the examples say anjoman_your_key.

Multi-miner call
curl https://backend.telegraphprotocol.com/agent/chat \
  -H "Authorization: Bearer anjoman_your_key" \
  -H "Content-Type: application/json" \
  -d '{"message": "What is the current price of Bitcoin in USD?", "stream": false}'

Anjoman's agent splits the request across intents and miners and writes one answer. The reply has the answer, its sources and costUsd. An answer that takes longer than about 80 seconds comes back as 202 with a jobId: read it from GET /agent/jobs/:id. Paid from your escrow balance, the default when the body names no payment.

What a key can call

Send every request to https://backend.telegraphprotocol.com with the header Authorization: Bearer and your key.

POST/agent/chat

Multi-miner call: ask in plain words with message, and Anjoman's agent splits it across intents and miners and writes one answer. Send stream: false for one JSON reply, or leave it out for a stream of events. conversationId continues a conversation and maxSpendUsd caps what the message may spend.

POST/engine/ask

Auto-routed ask: straight to the Telegraph node, which picks the best-ranked miner for a query or an intent with params, and asks the next ones for what it missed. Sent with a $0.26 budget; only the miners whose answers are used are billed.

POST/engine/ask/:minerId

Miner call: one miner you name, with no routing and no fallback, at its price. Send intent with params, a query, or its own method, endpoint and payload. :minerId is the id in the node's miner list, or the miner's slug for an intent or a query; not the id in its YAML.

GET/agent/jobs/:id

The state of a multi-miner call: status, costUsd, and the answer once it has one.

POST/agent/jobs/:id/cancel

Stop a request that is still running. Closing the connection does not stop it.

GET/engine/escrow/balance

The balance your calls are paid from.

GET/agent/spend

Your jobs with what each one cost, and totals.

GET/agent/conversations

Your conversations. Add /:id for one conversation with its messages.

GET/agent/payment-methods

How your account can pay for a message.

Limits and safety

  • A key makes up to 30 requests a minute. Past that, calls are refused with 429 until the minute is over.
  • An account can have 10 active keys.
  • A key with an expiry date stops working at the end of that day. A revoked key stops at once.
  • A key cannot create or revoke keys, deposit or withdraw, or change your account. Those need you to be signed in.
  • Keep a key on a server or in an agent's settings. Never put it in a web page, a mobile app or a public repository.