MINIMAL AISign in

MINIMAL AI › Solutions

How do I call Cocoon (Telegram's confidential AI network) through an API?

Through this gateway: `POST /v1/chat/completions` in the OpenAI format. The request is served by a Cocoon worker inside a trusted execution environment; the answer comes back with an Ed25519-signed receipt that includes the attestation evidence (on mainnet) and, for 402 requests, the payment. When Cocoon is not attested the gateway says so in the receipt and falls back to a strong model under a daily budget — never silently. We run a Cocoon worker ourselves and send fixes upstream.

Working example

curl -s https://ai.minimalcult.org/v1/models -H 'Authorization: Bearer <key>'
curl -s -X POST https://ai.minimalcult.org/v1/chat/completions -H 'Authorization: Bearer <key>' -H 'content-type: application/json' \
  -d '{"model":"best","messages":[{"role":"user","content":"What is a signed receipt?"}]}'
# the answer carries "minimalai": {"receipt": {... "tee": {...}, "sig": "..."}}

Where it is proven

Questions

Which model answers?

Cocoon's model when the network is attested (the receipt names it); `model: "best"` picks the strongest available.

Can I verify the TEE evidence myself?

The receipt carries the attestation fields; the verifier in the open core checks the signature, and the Cocoon root contract lists the allowed images.

How is it paid?

Per request: with a key balance in TON, or with no key over HTTP 402 (GRAM-402).

Every link above opens a live page or a public repository; nothing here is a promise.