SPB Git forge

spb/doc-api

Public
2commits 1branches 0releases
15.7 MBsize
maindefault branch
13 days agolast push
Python 88.3% TypeScript 7.6% Shell 4.1%
ZIP tar.gz
NameLast commitUpdated
docs Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
examples Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
generated Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
reports Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
schemas Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
scripts Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
sources Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
tests Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
.env.example Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
.gitignore API Atlas OpenAI + Anthropic: initial snapshot (2026-09-18) 13 days ago
CLAUDE.md Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
package.json Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
pnpm-lock.yaml Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
pyproject.toml API Atlas OpenAI + Anthropic: initial snapshot (2026-09-18) 13 days ago
README.md Extend the API Atlas to xAI (Grok) and Google Gemini 13 days ago
README.md source

# API Atlas — OpenAI + Anthropic + xAI + Gemini

Exhaustive, experimentally verified reference of everything you can do with the OpenAI, Anthropic, xAI (Grok) and Google Gemini public APIs as of 2026-09-18/19: models, endpoints, parameters, objects, streaming events, tools, agents, realtime, media, files, batch, fine-tuning, evals, admin, pricing, rate limits, errors, headers, SDKs, security, and a multi-provider abstraction. Machine-readable first (generated/), human docs second (docs/), runnable examples (examples/) and smoke tests (tests/) third.

Every fact carries a status (DOCUMENTED, LIVE_VERIFIED, LIVE_DISCOVERED, BETA, PREVIEW, LEGACY, DEPRECATED, RETIRED, ACCOUNT_RESTRICTED, UNVERIFIED, FAILED_VERIFICATION) and its sources (official URL + retrieval date). Nothing is claimed "tested" unless it was actually called with a real key (see reports/live-requests.jsonl).

# Start here

Need Go to
Overview & navigation docs/index.md
Which model supports what docs/models/openai-models.md · docs/models/anthropic-models.md · docs/models/xai-models.md · docs/models/gemini-models.md · generated/compatibility/model-capability-matrix.csv
Every endpoint generated/endpoints.csv · docs/endpoints/
Every parameter generated/parameters.csv (generated/parameters.json for nested detail)
Every tool (exact type strings) docs/tools/openai/index.md · docs/tools/anthropic/index.md · docs/tools/xai/index.md · docs/tools/gemini/index.md · generated/tools.json
Streaming events (SSE / WebSocket) generated/streaming-events.json · docs/openai/streaming-events.md · docs/openai/realtime-events.md · docs/anthropic/streaming.md
Agents platforms docs/openai/agents-api.md · docs/anthropic/managed-agents.md · docs/gemini/interactions-api.md · docs/xai/responses.md
Pricing docs/openai/pricing.md · docs/anthropic/pricing.md · docs/xai/pricing.md · docs/gemini/pricing.md · generated/pricing.csv
Errors & retries docs/errors/openai.md · docs/errors/anthropic.md · docs/errors/gemini.md · docs/xai/authentication-headers-errors.md · docs/architecture/resilience.md
Cross-provider comparisons (4 providers) docs/comparisons/
Security docs/security/README.md
Multi-provider code docs/architecture/multi-provider-abstraction.md · examples/shared/
What was verified, what is missing reports/final-report.md

# Setup

bash
cp .env.example .env && chmod 600 .env   # add OPENAI_API_KEY / ANTHROPIC_API_KEY / XAI_API_KEY / GEMINI_API_KEY
uv venv .venv && uv pip install --python .venv/bin/python openai anthropic xai-sdk google-genai pytest pyyaml jsonschema websockets
pnpm install                              # openai + @anthropic-ai/sdk + @google/genai for the TypeScript examples

Run an example: bash examples/anthropic/messages/minimal.sh, .venv/bin/python examples/openai/responses/minimal.py, node --env-file=.env --experimental-strip-types examples/openai/responses/minimal.ts.

Run the smoke tests (cheap by default; expensive suites are gated by RUN_*_TESTS=true, see .env.example):

bash
.venv/bin/python -m pytest -q

# Re-running the atlas (change detection)

bash
python3 scripts/update_atlas.py          # refresh indexes + crawl docs + /v1/models + rebuild + reports/changes.md
python3 scripts/build_generated.py       # rebuild generated/ from generated/fragments/
.venv/bin/python scripts/validate_fragments.py
python3 scripts/verify_links.py          # external + internal link check → reports/link-check.json

reports/changes.md lists NEW/REMOVED MODELS, ENDPOINTS, TOOLS, PRICING CHANGES, CONTEXT WINDOW CHANGES, NEW BETA FEATURES, DEPRECATIONS and the official pages whose content changed since the last run.

# Layout

text
docs/          human documentation (openai/, anthropic/, xai/, gemini/, models/, tools/, endpoints/, errors/, comparisons/, architecture/, security/)
generated/     merged machine-readable outputs (+ fragments/ = curated inputs, + compatibility/ matrices, + capability graph)
examples/      runnable cURL / Python / TypeScript examples with verification status in each file header
tests/         pytest smoke tests (openai/, anthropic/, shared/)
scripts/       crawl, discover, build, validate, verify, update
sources/       downloaded official documentation (OpenAI 551, Anthropic 696, xAI 182, Gemini 291 pages), OpenAPI/discovery specs, SDK surfaces, sanitized live discovery
schemas/       JSON Schemas for every record type
reports/       live request log, coverage, changes, final report

Security rules: keys only in .env (600, gitignored), never in files or logs; admin endpoints are probed read-only; all live tests use minimal payloads. See CLAUDE.md for the full conventions.