Documentation 29
OpenAI API quickstart · 3 min read
Platform telemetry, org-wide. Validated against OpenAI's own spec.
The OpenAI Platform's organization surface — users, projects, admin keys, usage, and costs — for a simulated org running a Codex trial. Every response validates against the OpenAPI document OpenAI publishes, and usage × pricing equals the cost report to the micro-cent.
Coverage, hosts and pinned snapshots for OpenAI — 44 of 122 read surfaces served and verified.
01 / Base URL + auth
The Admin + Usage APIs, mirrored from the official spec.
Point requests at https://openai.sandboxapis.dev. Paths, envelopes, and headers mirror api.openai.com exactly — the {object: "list"} admin envelopes, the {object: "page"} usage buckets, the openai-version response header, even the empty-body 404 the real platform answers on unknown organization routes. Auth is a Bearer admin key (sk-admin-…) — any value passes here.
curl -H 'Authorization: Bearer any-key' \
"https://openai.sandboxapis.dev/v1/organization/users?limit=5"Using a key? Keys & rate limits → — a SandboxAPIs key rides the same Bearer slot and lifts the anonymous limit.
02 / The reads that matter
Users, projects, usage, costs.
# The org roster — the Codex trial cohort, one owner
curl -H 'Authorization: Bearer any-key' "https://openai-2020-10.snap.sandboxapis.dev/v1/organization/users?limit=100"
# Daily completions usage: tokens + request counts, by model and project
# (start_time 1777224000 = this pin's 90-day window start)
curl -H 'Authorization: Bearer any-key' \
"https://openai-2020-10.snap.sandboxapis.dev/v1/organization/usage/completions?start_time=1777224000&group_by=model"
# Daily costs, itemized per model and token class
curl -H 'Authorization: Bearer any-key' \
"https://openai-2020-10.snap.sandboxapis.dev/v1/organization/costs?start_time=1777224000&group_by=line_item"03 / A real response
Live from the universe.
{
"object": "page",
"data": [
{
"object": "bucket",
"start_time": 1778544000,
"end_time": 1778630400,
"results": [
{
"object": "organization.costs.result",
"amount": {
"value": 0.001,
"currency": "usd"
},
"line_item": "gpt-5.6-luna, cached input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.005,
"currency": "usd"
},
"line_item": "gpt-5.6-luna, input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.0024,
"currency": "usd"
},
"line_item": "gpt-5.6-luna, output",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.066,
"currency": "usd"
},
"line_item": "gpt-5.6-terra, cached input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.33,
"currency": "usd"
},
"line_item": "gpt-5.6-terra, input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.132,
"currency": "usd"
},
"line_item": "gpt-5.6-terra, output",
"project_id": null
}
]
},
{
"object": "bucket",
"start_time": 1778716800,
"end_time": 1778803200,
"results": [
{
"object": "organization.costs.result",
"amount": {
"value": 0.0008,
"currency": "usd"
},
"line_item": "gpt-5.6-luna, cached input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.004,
"currency": "usd"
},
"line_item": "gpt-5.6-luna, input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.0036,
"currency": "usd"
},
"line_item": "gpt-5.6-luna, output",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.0524,
"currency": "usd"
},
"line_item": "gpt-5.6-terra, cached input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.262,
"currency": "usd"
},
"line_item": "gpt-5.6-terra, input",
"project_id": null
},
{
"object": "organization.costs.result",
"amount": {
"value": 0.156,
"currency": "usd"
},
"line_item": "gpt-5.6-terra, output",
"project_id": null
}
]
}
],
"has_more": true,
"next_page": "page_bzoy"
}04 / Pin a snapshot
Deterministic CI.
The *.snap. base URL is byte-identical on every request, with model IDs and pricing frozen at the pin's snapshot date — a spend fixture that never moves under your dashboards.
# reproducible in CI
export OPENAI_BASE_URL=https://openai-2020-10.snap.sandboxapis.dev/v1Tour the universe → · Coverage manifest → · Versioning & pinning →