Organization API
Organization holds the tenant’s own records: its members, feedback, usage, costs, charges and usage events. Concepts follow GitHub org members for the membership list and FOCUS 1.3 for the usage records. The org chart — departments, jobs, ladders, positions, assignments, specs and OKRs — is the workforce face at /workforce/v1 (ADR-191). Start with GET /organization/v1/members.
Base URL
https://api.deepraxis.com/organization/v1
Get started
curl
curl "https://api.deepraxis.com/organization/v1/costs?starting_at=2026-09-26T00:00:00Z&ending_at=2026-09-27T00:00:00Z&bucket_width=1d&group_by=ServiceName" \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
import os
import requests
opts = dict(
base_url="https://api.deepraxis.com/organization/v1",
api_key=os.environ["PRAXIS_API_KEY"],
)
# /organization 是我们自己的组织用量形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
f"{opts['base_url']}/costs?starting_at=2026-09-26T00:00:00Z&ending_at=2026-09-27T00:00:00Z&bucket_width=1d&group_by=ServiceName",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
const opts = {
baseURL: "https://api.deepraxis.com/organization/v1",
apiKey: process.env.PRAXIS_API_KEY,
};
// /organization 是我们自己的组织用量形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/costs?starting_at=2026-09-26T00:00:00Z&ending_at=2026-09-27T00:00:00Z&bucket_width=1d&group_by=ServiceName`, {
headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());Facts and limits
| Fact | Detail |
|---|---|
| The organization is the key | The caller’s API key resolves to exactly one organization; no organization id appears in any path, and any valid key of the organization can read this domain |
| Actual charges only | What the organization was actually charged, in its settlement currency (CNY or USD); promotional balance is taken before cash and is included |
| Column names follow FOCUS 1.3 | BilledCost, ServiceName, ConsumedQuantity and the rest match the FOCUS 1.3 specification verbatim |
| Everything is UTC | Window bounds and buckets are UTC ISO 8601; buckets align to the hour or the UTC day |
| Windows cap at 93 days | Costs, usage and events accept at most 93 days per query; for longer ranges use the charges export, which paginates day by day server-side |
| Pagination is an opaque cursor | Lists carry has_more and next_page; pass next_page back as page unchanged |
Amounts are decimal strings (e.g. "0.001234") in the currency named by BillingCurrency on the same row (CNY or USD) — don’t sum them as floats, and never add amounts of different currencies; reconcile with exact decimal arithmetic.
Only usage billed in USD from the funding account is counted here; Credits balances are not part of this domain. See Authentication for how keys work.
Endpoints
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/members | List organization members | ● Supported |
| GET | /v1/costs | List costs | ● Supported |
| GET | /v1/usage | List usage | ● Supported |
| GET | /v1/events | List usage events | ● Supported |
| GET | /v1/events/{id} | Get a usage event | ● Supported |
| GET | /v1/charges | Export charges | ● Supported |
Differences from FOCUS 1.3
- The envelope follows OpenAI’s organization usage/costs, the bucketing and estimated marker follow AWS GetCostAndUsage, column names follow FOCUS 1.3, and the export follows Vercel’s charges JSONL. Raw facts only: shares, trends and top-N views are not in this domain — compute them on your side.
For authoritative parameters and fields, see the spec published at /meta/v1/openapi.yaml and the FOCUS 1.3 specification.
Errors follow the problem+json format, see errors; quotas and response headers are covered in rate limits.