> This page is for Build.

> Append .md to any page URL for clean Markdown. Index: https://docs.speechify.ai/llms.txt.
>
> Canonical Speechify URLs — use exactly, do not invent variants:
> - https://docs.speechify.ai — this site (API reference, SDKs, quickstarts)
> - https://speechify.ai — marketing + product site
> - https://platform.speechify.ai — customer dashboard, signup, API keys, billing
> - https://api.speechify.ai — API base URL
> - https://github.com/Speechify-AI: GitHub org for the API (cookbook, demos, CLI). `github.com/speechify` does not exist.
> - https://status.speechify.ai — status + incidents
> - https://speechify.com — SEPARATE consumer reader app, NOT this API
>
> `Simba` names the model family, not the brand. Model ids: `simba-3.5` (48 languages under one id, English included; recommended), `simba-3.2` (English) and `simba-3.0` (English, German, Spanish, French, Italian and Portuguese; the default). `simba-english` and `simba-multilingual` are retired: a new workspace that sends either gets `400 model_retired`. `SimbaVoice` / `simbavoice.ai` are retired.
>
> Ask, don't scrape. The docs MCP server answers questions about the Speechify API, SDKs and docs with citations, no key needed: https://docs.speechify.ai/_mcp/server (Streamable HTTP, tool `searchDocs`). Setup: https://docs.speechify.ai/build/guides/get-started/connect-mcp

# Get Workspace Usage Report

GET https://api.speechify.ai/v1/workspaces/current/usage

What the workspace's usage cost over a window, grouped by model,
project or API key, readable with an API key. Each group carries the
metered quantity in its product's unit and its cost in US dollars,
priced at the workspace's plan rates.
Use it to charge usage back to your own customers or to see what
moved the bill. The figures are informational: an invoice also
carries fees, credits and taxes this report does not.

The window defaults to the calendar month (UTC) to date. For that
window `total_cost_usd` is the balance read's `monthly_spend`
(`GET /v1/workspaces/current/balance`) as of `as_of`, the same
figure the workspace budget is enforced on.
For any other window the total is the sum of its groups. A window may
start at most 100 days ago; an older `starting_at` is refused with
`400`. An `ending_at` later than now reads to now.

Each group's cost is its share of the total in proportion to what the
usage rated at, rounded to the micro-dollar by largest remainder, so
the groups add up to `total_cost_usd` to the micro-dollar: round a
sum of them to 6 decimal places to match it exactly. When there is
nothing to apportion `monthly_spend` by (no usage rated yet, or a
credit among the groups), each group keeps what it rated at and the
total is their sum. A group is one `value` for one `product`: the
same model can appear once for `tts` and once for `calls`.

Figures can be up to a minute old; `as_of` is when they were read.
Groups are ordered by `value`, the `null` group last, and paginate
with `cursor` while `has_more` is true. Every page of one walk reads
the figures and the window its first page read, even after the month
turns, so the pages add up to the total each carries; a cursor names
its window by itself, and a `group_by`, `starting_at` or `ending_at`
sent with it that names another window is refused with `400`. A
cursor stays usable for at least 15 minutes after `as_of`, after
which it is refused with `400` and the query must be repeated.

Reading figures that are not cached asks the billing provider, so
each workspace may do so 12 times a minute; past that, or when every
workspace together reads too fast, the request is refused with `429`
and a `Retry-After` header. Repeating a query within a minute is
answered from cache and does not count.

Requires an API key granted `billing:read` (or an unrestricted key).
A key pinned to a project is refused with `403`, as on every
workspace-level read, and so is a key whose owner may not view the
workspace's usage.


Reference: https://docs.speechify.ai/build/api-reference/v1/workspaces/current/usage

## Authentication

- `Authorization` header (bearer token, required) — Enter your API key with the `Bearer` prefix, e.g. 'Bearer sk_...'.

## Request

### Query parameters

- `group_by` (enum, required) — What to group usage by: `model` (the model id, such as `simba-3.5`), `project_id` (the project's `proj_` id; usage in the Default project groups as `null`) or `api_key_id` (the key's `key_` id; usage made without an API key, such as from the console, groups as `null`).
  - Allowed values: `model`, `project_id`, `api_key_id`
- `starting_at` (datetime, optional) — Start of the window, inclusive, as an RFC 3339 timestamp; a date alone (`2026-11-01`) reads as midnight UTC. Defaults to the start of the calendar month (UTC) the window ends in. At most 100 days ago.
- `ending_at` (datetime, optional) — End of the window, exclusive, in the same form as `starting_at`. Defaults to now, and a later value reads to now.
- `cursor` (string, optional) — Opaque pagination cursor from a previous response.
- `limit` (integer, optional, default: 50) — Max items per page (default 50, max 200).

## Response

### 200

The window's usage, grouped.

- `next_cursor` (string, required, nullable) — Opaque keyset cursor for the next page. Pass back as the `cursor` request parameter. `null` when the caller has reached the end of the list (`has_more` is also `false` in that case).
- `has_more` (boolean, required) — True when more rows exist beyond this page.
- `starting_at` (datetime, required) — Start of the window the report covers, inclusive.
- `ending_at` (datetime, required) — End of the window, exclusive. For a window that runs to now, the moment the figures were read.
- `group_by` (enum, required) — The property the groups are keyed by, as requested.
  - Allowed values: `model`, `project_id`, `api_key_id`
- `total_cost_usd` (double, required) — What the window's usage cost, in US dollars to the micro-dollar (at most 6 decimal places). For the calendar month to date it is the balance read's `monthly_spend`; otherwise the sum of the groups. Below zero only when credits priced into the plan outweigh the usage.
- `groups` (list of WorkspaceUsageGroup, required)
- `as_of` (datetime, required) — When the figures were read.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation. The response body is the standard `Error` envelope; for validation failures `error.fields` enumerates the offending fields as a `path -> message` map (code = `validation_failed`).

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

### 401 Unauthorized Error

Authentication is missing or invalid. The request did not carry a recognised credential (console session token, API key, or worker JWT).

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

### 403 Forbidden Error

The credential authenticated, but is not authorised for this resource - typically a workspace-role gate (owner / admin required) or a cross-tenant access attempt.

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

### 409 Conflict Error

The request conflicts with the current resource state - e.g. duplicate, optimistic-concurrency mismatch, or last-owner guard.

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

### 429 Too Many Requests Error

Rate limit or concurrency limit exceeded. `error.code` says which ceiling, and they need different responses: `rate_limited` is the request-rate budget (slow down), `concurrency_limit_reached` is a workspace-wide concurrency ceiling (fewer at once, or raise it), and `conversation_turn_in_progress` is contention over one named conversation (keep one message in flight on it). Every 429 carries `Retry-After` and the request-rate budget headers; the active-call cap also carries `RateLimit-Remaining-Calls: 0`.

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

### 500 Internal Server Error

An unexpected server-side error occurred. Safe to retry with exponential backoff for idempotent requests.

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

### 502 Bad Gateway Error

An upstream dependency (the TTS composer or voice-metadata service) returned a 5xx. The raw upstream detail is not forwarded - the cause is in the server log; the response is a fixed `upstream_failure` envelope. Safe to retry.

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

### 503 Service Unavailable Error

A downstream dependency is degraded or the endpoint is intentionally disabled (e.g. phone-number purchase before ops setup).

- `error` (ErrorDetail, required)
- `request_id` (string, optional) — Server-side request identifier. Echoes the `Speechify-Request-Id` response header. Stable across the request's lifetime, written to structured logs, and useful when reporting issues.

## Types

### WorkspaceUsageGroup

One value's usage of one product over the window.

- `value` (string, required, nullable) — The group's value: a model id, a `proj_` project id or a `key_` API key id, by `group_by`. `null` for usage with no value for it: no model, the Default project, or no API key.
- `product` (enum, required) — What the usage was: `tts` speech synthesis, `calls` live voice calls, `llm` language-model tokens, or `other` for usage of a product this report does not name yet.
  - Allowed values: `tts`, `calls`, `llm`, `other`
- `quantity` (double, required) — The metered amount of usage, in `unit`.
- `unit` (enum, required) — The unit `quantity` is in: `characters` for `tts`, `minutes` for `calls`, and `usd` for `llm`, because language-model tokens are metered by their list-price cost in US dollars rather than counted. `units` for `other`.
  - Allowed values: `characters`, `minutes`, `usd`, `units`
- `cost_usd` (double, required) — The group's share of `total_cost_usd`, in US dollars to the micro-dollar (at most 6 decimal places). Below zero only for a group the plan prices as a credit.

### ErrorDetail

- `code` (enum, required) — Stable machine-readable error code. Additive only: codes are never renamed, only deprecated. SDKs may map each code to a typed exception class. Status-code semantics: 4xx codes describe caller-fixable issues; 5xx codes describe server-side failures and are safe to retry with backoff for idempotent requests.
  - Allowed values: `endpoint_moved`, `bad_request`, `validation_failed`, `unauthorized`, `payment_required`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `idempotency_conflict`, `payload_too_large`, `unsupported_media_type`, `rate_limited`, `concurrency_limit_reached`, `invalid_api_version`, `internal_error`, `upstream_failure`, `service_unavailable`, `caller_not_found`, `contact_not_found`, `contact_identifier_not_found`, `contact_identifier_conflict`, `contact_resolver_not_found`, `credential_not_found`, `credential_in_use`, `agent_not_found`, `agent_in_use`, `agent_run_not_found`, `kb_not_found`, `kb_document_not_found`, `kb_folder_not_found`, `tool_not_found`, `tool_name_taken`, `channel_instance_not_found`, `team_not_found`, `trigger_not_found`, `store_not_found`, `store_document_not_found`, `hosted_api_not_found`, `api_route_not_found`, `consumer_key_not_found`, `skill_not_found`, `skill_version_not_found`, `file_not_found`, `file_path_taken`, `file_storage_limit_reached`, `store_limit_reached`, `store_document_limit_reached`, `store_bytes_limit_reached`, `store_not_configured`, `store_document_version_conflict`, `store_document_deleted`, `entitlement_override_exists`, `hosted_apis_not_in_plan`, `skills_not_in_plan`, `voice_agents_not_in_plan`, `skill_in_use`, `skill_tool_name_conflict`, `skill_limit_reached`, `agent_skill_limit_reached`, `hosted_api_slug_taken`, `api_route_conflict`, `mount_plan_changed`, `route_output_unavailable`, `route_run_timeout`, `route_run_failed`, `route_run_limit_reached`, `route_read_limit_reached`, `route_write_limit_reached`, `hosted_api_public_refused`, `route_tool_not_readable`, `route_tool_unavailable`, `route_upstream_rate_limited`, `route_upstream_error`, `hosted_mcp_not_enabled`, `hosted_api_busy`, `conversation_not_found`, `phone_number_not_found`, `sip_trunk_not_found`, `voice_not_found`, `audio_asset_not_found`, `builtin_not_found`, `batch_not_found`, `agent_test_not_found`, `workspace_not_found`, `invite_not_found`, `project_not_found`, `cross_project_reference`, `project_has_scoped_credentials`, `project_not_empty`, `project_limit_reached`, `agent_limit_reached`, `project_too_large_to_promote`, `call_not_found`, `message_not_found`, `thread_not_found`, `call_not_active`, `relay_displaces_agent`, `brain_not_found`, `brain_in_use`, `custom_model_not_found`, `custom_model_in_use`, `insufficient_scope`, `purchased_numbers_not_included`, `phone_number_quota_reached`, `batch_calls_not_included`, `voice_cloning_not_included`, `voice_cloning_unavailable_in_region`, `consent_challenge_not_found`, `consent_challenge_expired`, `consent_challenge_already_used`, `consent_phrase_mismatch`, `consent_speaker_mismatch`, `consent_recording_unusable`, `consent_verification_unavailable`, `consent_verification_required`, `watermark_audio_unusable`, `watermark_detection_unavailable`, `workspace_last_owner`, `workspace_last_workspace`, `account_deletion_blocked`, `workspace_free_limit`, `workspace_single_owner`, `invite_email_mismatch`, `invite_already_pending`, `service_account_limit_reached`, `service_accounts_not_in_plan`, `speech_marks_unsupported`, `pronunciations_unsupported`, `model_retired`, `too_many_voices`, `content_policy_violation`, `safety_identifier_blocked`, `topup_not_in_plan`, `credit_purchase_unpaid`, `credit_purchase_payment_in_progress`, `tool_config_shared`, `spend_cap_exceeded`, `spend_budget_exceeded`, `project_spend_limit_exceeded`, `project_archived`, `project_not_archived`, `project_not_purged`, `project_restore_window_expired`, `project_name_taken`, `funded_balance_required`, `agent_publish_gate_failed`, `agent_publish_gate_required`, `agent_publish_gate_unavailable`, `agent_publish_gate_tool_unreachable`, `text_channel_not_in_plan`, `channel_not_in_plan`, `text_turn_failed`, `conversation_turn_in_progress`, `conversation_closed`, `conversation_not_reachable`, `conversation_channel_bound`, `conversation_prompt_not_found`, `text_message_quota_exceeded`, `durable_runs_not_in_plan`, `tool_transport_unsupported`, `agent_config_too_large`, `agent_run_not_pending`, `agent_run_action_stale`, `share_link_not_found`, `share_link_exhausted`, `share_link_limit_reached`, `destination_not_allowed`, `international_dialing_not_enabled`, `number_not_sms_capable`, `verification_required`, `intended_use_required`
- `message` (string, required) — Human-readable explanation of this specific occurrence. Safe to surface in UI banners or pass to support. The wording can change between releases; clients should match on `code`, not on the message string.
- `fields` (map from string to string, optional) — Per-field validation errors as `path -> message`. Only present on 400 responses caused by request validation (typically code=`validation_failed`). Keys are field paths in dotted/bracket notation; values are short human explanations safe to inline-surface next to the offending form field.
- `details` (map from string to any, optional) — Structured, endpoint-specific context beyond the flat `fields` map. Present only on the few errors that carry it (e.g. the `used_by` referrer list on a credential delete-conflict); its shape depends on the error `code`. Clients that don't recognise a `details` shape can ignore it - the `code` + `message` contract is unchanged.
- `docs_url` (string, optional) — Link to the documentation that resolves this class of error, when a stable page exists. Rate and concurrency 429s link the API limits reference, which lists each plan's limits and how to raise them.

## Examples

**Response**

```json
{
  "next_cursor": null,
  "has_more": false,
  "starting_at": "2026-11-01T00:00:00Z",
  "ending_at": "2026-11-27T12:00:00Z",
  "group_by": "model",
  "total_cost_usd": 128.4412,
  "groups": [
    {
      "value": "gpt-5-mini",
      "product": "llm",
      "quantity": 3.7912,
      "unit": "usd",
      "cost_usd": 3.7912
    },
    {
      "value": "simba-3.2",
      "product": "tts",
      "quantity": 2000000,
      "unit": "characters",
      "cost_usd": 20
    },
    {
      "value": "simba-3.5",
      "product": "calls",
      "quantity": 120.5,
      "unit": "minutes",
      "cost_usd": 12.05
    },
    {
      "value": "simba-3.5",
      "product": "tts",
      "quantity": 9260000,
      "unit": "characters",
      "cost_usd": 92.6
    }
  ],
  "as_of": "2026-11-27T12:00:05Z"
}
```