Keys
The same sealed lane,from your own code.
One endpoint in the common chat-completions shape. Every response carries its receipt, so your code can check the answer the way this app does: recover the signer, compare with the registry.
Sign in to create a key. It is minted after one more signed message that names it: no transaction, no network fee. Calls are paid from your credits.
A first call
curl https://app.oathnetwork.tech/v1/chat/completions \
-H "Authorization: Bearer $OATH_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"oath-stand-in","messages":[{"role":"user","content":"Hello"}]}'The response is the usual shape with one more field, oath: the receipt, the salt of the prompt hash, and what the call cost. The receipt's number is also in the x-oath-receipt header.
Two ways in
Said plainly.
A plain request
The call above. Our relay seals it to the machine for you, so the relay sees the prompt on its way through. The answer still carries a receipt. Every such response says so: x-oath-sealed: relay.
A sealed envelope
Your code checks the machine and encrypts the prompt to its key, as this app does in the browser. The relay then carries ciphertext only: x-oath-sealed: end-to-end.
Checking an answer
keccak-256 over the receipt's eight fields, one per line; recover the signer from the signature; compare signer, code fingerprint and attestation hash with the registry.
Paying
From this wallet's credits: the model's cost plus the fee. A call that returns no valid receipt is not charged.
Credits