API Overview
B3IQ's endpoint-first developer surface: hosted gateway APIs, local host-agent APIs, private jobs, receipts, billing, and stable error codes.
B3IQ is endpoint-first. Developers call HTTP APIs directly. The official developer surface is endpoint behavior, OpenAPI specs, examples, stable error codes, and public protocol metadata.
B3IQ intentionally avoids client-library and adapter scope. OpenAI-compatible requests should work with standard HTTP clients and compatible model tooling.
API Families
Credential Separation
| Surface | Credential | Notes |
|---|---|---|
| Local host-agent chat | b3iq_local_ | Local-only scoped key created by the owner in the setup wizard |
| Hosted gateway chat | b3iq_gateway_ | Gateway key that may carry customer billing ownership |
| Native private jobs | customer headers | Customer ID and token headers for B3IQ-native job creation and billing reads |
| Setup and local admin | owner session or setup token | Local operator UI and setup APIs, not normal application credentials |
| Admin operations | admin token | Command center and operational endpoints, never client-side public app credentials |
Base URLs
bashexport B3IQ_GATEWAY_BASE_URL="https://control-plane.b3iq.org"export B3IQ_LOCAL_BASE_URL="http://127.0.0.1:8831"
Use the deployed control-plane host only when you have valid hosted gateway or customer credentials. For local node work, use the host-agent URL on the machine running B3IQ.
Request Safety Pattern
Store keys in files
bashumask 077mkdir -p .secretscat > .secrets/b3iq-gateway-keycat > .secrets/b3iq-local-key
Pass auth through a short-lived config
Avoid placing bearer tokens directly in shell argv.
Send request bodies through stdin
This keeps examples readable and avoids local files that accidentally include prompts, outputs, or secret material.
OpenAPI Specs
Public Privacy Rule
Prompts, outputs, exact private routes, API keys, customer identity, local URLs, filesystem paths, raw request logs, raw tokens, and raw TEE quotes do not belong in public docs examples, public protocol payloads, or onchain metadata.
