TOON

Token-efficient responses for AI agents.

Same data, fewer tokens

Token-Oriented Object Notation strips braces and quotes while keeping structure. LlmResponse<T> negotiates on the Accept header: JSON for browsers, TOON for agents. Enable it with the protocol-toon feature.

TOON crate deep dive · toon-api example

JSON
[
  {"id": 1, "role": "admin", "active": true},
  {"id": 2, "role": "user",  "active": true},
  {"id": 3, "role": "user",  "active": false}
]
TOON
users[3]{id,role,active}:
  1,admin,true
  2,user,true
  3,user,false

Deploy your first Rust API.

Create an account, run one command, get an HTTPS URL. Free on the Hobby plan.