Get project billing overview
Get project billing overview: getBillingOverview in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{projectId}/billing
Returns the selected project's plan information, entitlements and current billing-period usage. This operation reads project billing state; it does not change plans or the payer's payment method. Organization-level plans are available through the organization billing overview.
photon.projects.billing.getOverview(input: GetBillingOverviewInput, options?: RequestOptions): Promise<GetBillingOverviewOutput>photon.projects.billing.get_overview(input: GetBillingOverviewInput, *, options: RequestOptions | None = None) -> models.GetBillingOverviewResponseclient.get_billing_overview(project_id: String).await -> Result<ResponseValue<types::GetBillingOverviewResponse>, Error<GetBillingOverviewError>>client.Projects.Billing.GetOverview(ctx context.Context, params *GetBillingOverviewParams, opts ...RequestOption) (*GetBillingOverviewResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.billing.getOverview({
path: {
projectId: "projectId",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import GetBillingOverviewInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.billing.get_overview(
GetBillingOverviewInput.model_validate({
"path": {
"projectId": "projectId",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.get_billing_overview("projectId".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Billing.GetOverview(ctx, &photonapi.GetBillingOverviewParams{
ProjectID: "projectId",
})
if err != nil {
return err
}
_ = result{
"entitlementsVersion": 0,
"subscriptions": [
{
"baseAmountCents": 0,
"cancelsAt": null,
"category": "string",
"categoryDisplayName": null,
"currency": "string",
"currentPeriodEnd": null,
"entitlements": [
{
"featureKey": "string",
"value": "string"
}
],
"fixedCharges": [
{
"chargeModel": "graduated",
"displayName": "string",
"fixedChargeCode": "string",
"payInAdvance": true,
"pricing": {},
"prorated": true,
"quantity": 0
}
],
"minimumCommitment": null,
"planCode": "string",
"planName": "string",
"status": "active",
"tierDisplayName": null
}
],
"usage": [
{
"amountCents": -9007199254740991,
"category": "string",
"categoryDisplayName": null,
"currency": "string",
"displayName": "string",
"metricCode": "string",
"units": -9007199254740991
}
]
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
The project being billed.
Returns
200 Plan, entitlements, and current-period usage. GetBillingOverviewResponse
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
Bumps on every entitlement change in any category.
One entry per category that currently holds a subscription. Empty means none do — cancelled, or never opened.
Current-period metered usage, priced.
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.