For AI agents, the documentation index lists all pages. Append .md to a documentation URL for Markdown, or request text/markdown.

Skip to Content
spare inference

Authentication

Authenticate with an API key, and the scopes that gate usage, billing and configuration endpoints.

1 min readEdit this page

Send your API key either way; both work on every endpoint.

Authorization: Bearer $SPARE_API_KEY
x-api-key: $SPARE_API_KEY

OpenAI SDKs send the first, Anthropic SDKs the second.

Scopes

A new key can call models and read its own requests' settlement (inference:invoke). To read your balance or use the configuration endpoints, create a key in the console with the scopes listed in the endpoint tables. Calling an endpoint without its scope returns 403 with the missing scope in the message.

me

Paths under /v1/namespaces/me/ act on the workspace the key belongs to, so you never need a workspace id.

How is this guide?

On this page