Developers

Build on ZCode

Your balance, backups and top-ups, from your own code. This is a preview, and it may change before it's stable.

Endpoints

GET/api/balance

Your available and reserved credits, recent receipts and the model in use.

GET · PUT/api/backup

Fetch or replace your encrypted chat backup. The server only ever sees ciphertext.

POST/api/topup

Create a shielded ZEC invoice for a credit pack: address, amount and payment link. In beta, Starter only.

Authentication

Send your access key as a bearer token. It's the zc_… part of your session; the server stores only its hash.

Example

curl https://zcode.sh/api/balance \
  -H "authorization: Bearer $ZCODE_KEY"

Asking questions by API is paused

Answers are now encrypted in the browser so ZCode's server can't read them, which means the old readable route is closed. It returns once there's an encrypted route for code to use.