Skip to content

For AI agents: every API docs page in one plain-text file is at /docs/llms-full.txt, and the documentation index is at /llms.txt. This page is available as Markdown at https://diffio.ai/docs/overview/concepts/end-users.md, and every docs URL returns Markdown when requested with Accept: text/markdown.

End users: one key, many customers

An end user is one of your customers, named by the Diffio-End-User header your server sends; Diffio keeps their projects apart.A request with the header reaches only that end user's projects; one without it acts for the whole account.

How it works

  1. Your server → Diffio API: POST /projects, Diffio-End-User: customer-42
  2. Diffio API → Your server: project, end_user: "customer-42"
  3. Your server → Diffio API: GET /projects/{id}, Diffio-End-User: customer-7
  4. Diffio API → Your server: 404 project_not_found, another customer's project
  5. Your server → Diffio API: GET /usage, Diffio-End-User: customer-42
  6. Diffio API → Your server: usage, that customer's generations only
  7. Diffio API → Your server: webhook, data.end_user on every event
One API key, two customers. Without the header, a request sees every project on the account.

Limits

LimitValue
Diffio-End-Userup to 128 characters; longer is 400 invalid_header
end_user in a bodyrefused (400 invalid_field); send the header
POST /webhooks/portalaccount-wide; the header is refused (403 permission_denied)
Idempotency-Key on POST /projectsscoped to the account and the end user

Build with it

Report an issue with this page