Switching Orgs
A user can belong to multiple organizations. The org used for a given request determines the billing account, rate limits, model access, and visible files.
With API keys
Section titled “With API keys”API keys are scoped to a single org at creation time. The key chooses the org — no extra header needed.
curl https://api.aiand.com/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -d '{...}'To act on a different org, use that org’s API key.
With JWT (browser / console)
Section titled “With JWT (browser / console)”JWTs identify the user, not an org. Pass X-Org-ID on every request to select the active org:
curl https://api.aiand.com/api/v1/keys \ -H "Authorization: Bearer <jwt>" \ -H "X-Org-ID: <org-id>"Requests without X-Org-ID on JWT-authed endpoints return 400.
Listing your orgs
Section titled “Listing your orgs”curl https://api.aiand.com/api/v1/me \ -H "Authorization: Bearer <jwt>"The response includes a memberships array with each org’s id, name, and your role in it.