Founding keys are opena year free at 6,000 req/hour, for the first 1,000 developersClaim yours
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.

01Point your calls at openai.
02Read the organization scope
03Pin a snapshot for CI

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.

request.sh
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.

report.sh
# 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.

200 · application/json
{
  "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.

.env
# reproducible in CI
export OPENAI_BASE_URL=https://openai-2020-10.snap.sandboxapis.dev/v1

Tour the universe → · Coverage manifest → · Versioning & pinning →