Skip to content
中文

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

FactDetail
The organization is the keyThe 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 onlyWhat 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.3BilledCost, ServiceName, ConsumedQuantity and the rest match the FOCUS 1.3 specification verbatim
Everything is UTCWindow bounds and buckets are UTC ISO 8601; buckets align to the hour or the UTC day
Windows cap at 93 daysCosts, 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 cursorLists 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

MethodPathDescriptionSupport
GET/v1/membersList organization members● Supported
GET/v1/costsList costs● Supported
GET/v1/usageList usage● Supported
GET/v1/eventsList usage events● Supported
GET/v1/events/{id}Get a usage event● Supported
GET/v1/chargesExport 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.