Skip to main content
The Pricing API accepts one of two credentials. Send one per request. If a request carries both, the API returns 400 with Send either an API key or an access token, not both.

Permissions

Both credentials carry permissions named pricing:read and pricing:write. Changes with pricing:write also need an admin role. A request without the required permission returns 403 with code permission_denied.

Get an API key

Create an API key at app.costgraph.ai and set its permissions when you create it.

Get an access token

Register an app and sign people in as described in Sign in with CostGraph. Request pricing:read, pricing:write, or both in the scope parameter, then send the access token as a bearer token.

Authenticate with the SDK

The SDK examples send an API key.

Raw HTTP

Include your API key in the X-API-KEY header:
An invalid key returns a 401 problem document with code unauthenticated. On /v1, every error is an RFC 9457 problem document; see Errors.