Cost report

⚠️
Preview — this feature is being built; the design below is the spec.

The cost report returns what your organization spent, in US dollars, per day, split by workspace and by line item. It answers finance questions (“what did the support team’s workspace cost last month?”, “how much went on web search?”) and is the number to reconcile against your invoices.

Tokens covered by your plan allowance cost nothing extra and appear here with a cost of zero and billing_source: "subscription", so the report shows both what was used and what was paid for.

Endpoint

GET /v1/organizations/cost_report

Authenticate with an admin key and send syntic-beta: admin-2026-11-01.

Query parameters

ParameterRequiredDescription
starting_atYesFirst day, RFC 3339 at midnight UTC.
ending_atNoExclusive end. Default: now.
group_by[]Noworkspace_id, description, model, billing_source. Repeat for several.
workspace_ids[]NoOnly these workspaces.
limitNoDays per page, 1 to 31, default 7.
after_idNoThe last_id from the previous response (next page).
before_idNoThe first_id from the previous response (previous page).

Buckets are always one UTC day.

Response

{
  "data": [
    {
      "starting_at": "2026-11-04T00:00:00Z",
      "ending_at": "2026-11-05T00:00:00Z",
      "results": [
        {
          "workspace_id": "wrkspc_01JC0A2C4E6G8J0L2N4Q",
          "description": "Amara S1.2 output tokens",
          "line_item": "tokens.output",
          "model": "Amara S1.2",
          "billing_source": "api_credit",
          "quantity": "1204011",
          "unit": "token",
          "amount_usd": "14.4481"
        },
        {
          "workspace_id": "wrkspc_01JC0A2C4E6G8J0L2N4Q",
          "description": "Web search",
          "line_item": "server_tool.web_search",
          "model": null,
          "billing_source": "api_credit",
          "quantity": "412",
          "unit": "search",
          "amount_usd": "4.1200"
        }
      ]
    }
  ],
  "has_more": false,
  "first_id": "bkt_01JC7A0B2C4D6E8F",
  "last_id": "bkt_01JC7A0B2C4D6E8F"
}
FieldMeaning
descriptionA readable label, stable enough to group on.
line_itemA stable machine name: tokens.input, tokens.cached_input, tokens.output, server_tool.web_search, server_tool.web_fetch, code_execution.container_seconds, memory.storage, batch.tokens.input, batch.tokens.output and so on. New line items may be added.
billing_sourcesubscription (covered by the plan, amount_usd is 0) or api_credit.
quantity, unitHow much was used, as a decimal string.
amount_usdCost as a decimal string with 4 decimal places.

Not included: plan subscription fees, credit purchases, taxes and refunds. Those are on your invoices in Billing.

Reconciling with invoices

Summing amount_usd for a calendar month gives the usage-credit charges for that month, to within a cent per line of rounding. Costs for a day are final 24 hours after the day ends; until then the latest day can change.

Examples

# Last month by workspace and line item, as CSV
curl -sS -G https://app.syntic.ai/v1/organizations/cost_report \
  -H "Authorization: Bearer $SYNTIC_ADMIN_KEY" \
  -H "syntic-beta: admin-2026-11-01" \
  --data-urlencode "starting_at=2026-10-01T00:00:00Z" \
  --data-urlencode "ending_at=2026-11-01T00:00:00Z" \
  --data-urlencode "group_by[]=workspace_id" \
  --data-urlencode "group_by[]=description" \
  --data-urlencode "limit=31" \
| jq -r '.data[] | .starting_at as $d | .results[] | [$d, .workspace_id, .description, .amount_usd] | @csv'

Errors

Errors use the error envelope.

StatustypecodeWhen
400invalid_request_errorinvalid_time_rangestarting_at missing, not at midnight UTC, or after ending_at.
400invalid_request_errorinvalid_group_byUnknown grouping dimension.
403permission_erroradmin_key_requiredAn inference key was used.

Build notes for the platform team

  • Build from the same usage rows and rate table that produce wallet debits, so the report and the wallet cannot disagree.
  • Add a line_item on every new billable feature (web search, code execution, memory storage) in its first release.
  • Reconcile monthly totals against the payment provider’s invoices in an automated check.
Was this page helpful?