Concepts
Organizations and projects
Everything in OneOS belongs to an organization. Every request acts in exactly one organization, and the gateway decides which from the credential, never from the request.
Organizations
An organization (o_…) is the boundary for resources, keys, members, usage and billing. The gateway verifies the credential on each request, attaches its organization, and services read and write only that organization's data.
- An API key belongs to the organization it was created in, for as long as it exists.
- A signed-in session (
genesis login, the Console) acts in the organization you select. People in more than one organization switch withgenesis orgs switchor the Console's organization menu.
Check which organization a credential acts in:
curl "https://os.one.ml/api/v1/whoami" -H "Authorization: Bearer $GENESIS_API_KEY"genesis whoami
genesis orgs listWorkspaces and projects
Inside an organization, a workspace groups projects, and a project holds resources. Some services act on a selected workspace and project rather than the whole organization:
- Organization-wide services take the organization from the credential and need nothing more. Hives, Silos and Traces work this way; their resources carry their own ids (a Hives project
prj_…, a Silos project, a Traces run). - Selection-bound services act inside the selected workspace and project. A signed-in session carries that selection; set it with
genesis context select --organization <id> --workspace <id> --project <id>, or in the Console.
An organization API key carries a selected context too: a project and workspace in its organization, and an environment. GET /v1/whoami returns it as selected_context:
{
"object": "principal",
"kind": "api_key",
"org": "o_01M4RYY608B21SF83WXTJD5E9D",
"selected_context": {
"organization_id": "o_01M4RYY608B21SF83WXTJD5E9D",
"project_id": "pr_01M4RYY608ETJYE2B34RGXZ524",
"workspace_id": "w_01M4RYY608DPHBZPASTAPMXSHM",
"platform_id": "pf_console",
"environment": "sandbox"
}
}Selection-bound services act in that context for the key; a few operations still need a signed-in session, and their badge says so. Each operation in the API reference shows whether an API key passed it in testing.
Choosing a project per request
An API key can act in another project or workspace of its organization for one request, with headers. The gateway checks them with One account before the request goes anywhere and never passes them to a service.
| Header | Value | Example |
|---|---|---|
x-oneos-project | A project id in the key's organization | pr_01M4RYY608ETJYE2B34RGXZ524 |
x-oneos-workspace | A workspace id in the key's organization | w_01M4RYY608DPHBZPASTAPMXSHM |
x-oneos-environment | sandbox or live | sandbox |
curl "https://os.one.ml/api/v1/whoami" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "x-oneos-project: pr_01M4RYY608ETJYE2B34RGXZ524"- A malformed or repeated header answers
400 INVALID_CONTEXT_HEADER. - A project or workspace outside the key's organization answers
403 CONTEXT_OVERRIDE_DENIED, with the reason inmessage. - The headers apply to organization API keys only; a signed-in session keeps the selection it has.
Related
- Environments — Sandbox and Live within an organization.
- Authentication — keys, sessions and how the gateway verifies them.
L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support