diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index a5d96b7f..41d5be7c 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -40586,7 +40586,7 @@ openapi: '3.1.0' paths: /activity: get: - description: 'Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: an omitted `workspace_id` defaults to it, a `workspace_id` naming any other workspace returns 403, `api_key_hash` and `user_id` resolve only keys and members of that workspace, and legacy activity with no workspace is excluded (including for the default workspace). For Custom keys, `api_key_hash` also requires `api_keys:view_all` and does not resolve deleted keys. `user_id` also requires `workspace_members:view` on an explicit non-default workspace; organization and default-workspace member filtering requires `org_members:view`, which is not available as a Custom grant. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: an omitted `workspace_id` defaults to it, a `workspace_id` naming any other workspace returns 403, `api_key_hash` and `user_id` resolve only keys and members of that workspace, and legacy activity with no workspace is excluded (including for the default workspace). For Custom keys, `api_key_hash` also requires `api_keys:view_all` and does not resolve deleted keys, and organization-scoped Custom keys supplying `workspace_id` also require `workspace:view`. For `user_id`, non-default workspace-scoped Custom keys require `workspace_members:view` (whether or not `workspace_id` is passed), default-workspace Custom keys cannot use `user_id`, and organization-scoped Custom keys require `org_members:view` even when filtering by `workspace_id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'getUserActivity' parameters: - description: 'Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).' @@ -40934,7 +40934,7 @@ paths: type: 'integer' metrics: items: - description: 'Metric name' + description: 'Metric name. Spend metrics are in USD: `total_usage` is credit spend plus BYOK spend, `credits_usage` is credit spend only, and `byok_usage` is BYOK spend only. /meta lists the public metric catalog, and a few metrics in it are unavailable to workspace-scoped keys. A raw-only metric such as `p50_throughput` moves the query to raw generations, where `byok_usage` and `total_usage` omit external inference cost for rows without a provider key ID, such as on-prem gateway traffic.' example: 'request_count' type: 'string' minItems: 1 @@ -51843,7 +51843,7 @@ paths: workspace_id: '0df9e665-d932-5740-b2c7-b52af166bc11' properties: byok_usage: - description: 'Total external BYOK usage (in USD) for the API key' + description: 'Total external BYOK usage (in USD) for the API key. This is the inference cost OpenRouter records for requests served through your own provider keys, computed from token counts and configured prices, not the amount your provider invoices you. It is not included in the `usage*` fields.' example: 17.38 format: 'double' type: 'number' @@ -51853,7 +51853,7 @@ paths: format: 'double' type: 'number' byok_usage_monthly: - description: 'External BYOK usage (in USD) for current UTC month' + description: 'External BYOK usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st.' example: 17.38 format: 'double' type: 'number' @@ -51894,7 +51894,7 @@ paths: example: 'f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943' type: 'string' include_byok_in_limit: - description: 'Whether to include external BYOK usage in the credit limit' + description: 'Whether external BYOK usage counts toward this key''s limit. When false, only credit usage is checked against `limit`.' example: false type: 'boolean' label: @@ -51916,7 +51916,7 @@ paths: - 'number' - 'null' limit_remaining: - description: 'Remaining spending limit in USD' + description: 'Remaining spending limit in USD. Credit usage always counts toward `limit`; BYOK usage counts only when `include_byok_in_limit` is true.' example: 74.5 format: 'double' type: @@ -51939,22 +51939,22 @@ paths: - 'string' - 'null' usage: - description: 'Total OpenRouter credit usage (in USD) for the API key' + description: 'Total OpenRouter credit usage (in USD) for the API key: the spend allocated to this key, including requests funded from a credit pool. It is not a debit total for the account balance. It excludes external BYOK inference cost, which is reported separately in `byok_usage`, but a BYOK platform fee, where charged, is credit spend and is included here.' example: 25.5 format: 'double' type: 'number' usage_daily: - description: 'OpenRouter credit usage (in USD) for the current UTC day' + description: 'OpenRouter credit usage (in USD) for the current UTC day. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_monthly: - description: 'OpenRouter credit usage (in USD) for the current UTC month' + description: 'OpenRouter credit usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_weekly: - description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)' + description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday). Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' @@ -52116,7 +52116,7 @@ paths: - 'user' type: 'object' include_byok_in_limit: - description: 'Whether to include BYOK usage in the limit' + description: 'Whether external BYOK usage counts toward this key''s limit. When false, only credit usage is checked against `limit`.' example: true type: 'boolean' limit: @@ -52240,7 +52240,7 @@ paths: workspace_id: '0df9e665-d932-5740-b2c7-b52af166bc11' properties: byok_usage: - description: 'Total external BYOK usage (in USD) for the API key' + description: 'Total external BYOK usage (in USD) for the API key. This is the inference cost OpenRouter records for requests served through your own provider keys, computed from token counts and configured prices, not the amount your provider invoices you. It is not included in the `usage*` fields.' example: 17.38 format: 'double' type: 'number' @@ -52250,7 +52250,7 @@ paths: format: 'double' type: 'number' byok_usage_monthly: - description: 'External BYOK usage (in USD) for current UTC month' + description: 'External BYOK usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st.' example: 17.38 format: 'double' type: 'number' @@ -52291,7 +52291,7 @@ paths: example: 'f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943' type: 'string' include_byok_in_limit: - description: 'Whether to include external BYOK usage in the credit limit' + description: 'Whether external BYOK usage counts toward this key''s limit. When false, only credit usage is checked against `limit`.' example: false type: 'boolean' label: @@ -52313,7 +52313,7 @@ paths: - 'number' - 'null' limit_remaining: - description: 'Remaining spending limit in USD' + description: 'Remaining spending limit in USD. Credit usage always counts toward `limit`; BYOK usage counts only when `include_byok_in_limit` is true.' example: 74.5 format: 'double' type: @@ -52336,22 +52336,22 @@ paths: - 'string' - 'null' usage: - description: 'Total OpenRouter credit usage (in USD) for the API key' + description: 'Total OpenRouter credit usage (in USD) for the API key: the spend allocated to this key, including requests funded from a credit pool. It is not a debit total for the account balance. It excludes external BYOK inference cost, which is reported separately in `byok_usage`, but a BYOK platform fee, where charged, is credit spend and is included here.' example: 25.5 format: 'double' type: 'number' usage_daily: - description: 'OpenRouter credit usage (in USD) for the current UTC day' + description: 'OpenRouter credit usage (in USD) for the current UTC day. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_monthly: - description: 'OpenRouter credit usage (in USD) for the current UTC month' + description: 'OpenRouter credit usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_weekly: - description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)' + description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday). Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' @@ -52627,7 +52627,7 @@ paths: workspace_id: '0df9e665-d932-5740-b2c7-b52af166bc11' properties: byok_usage: - description: 'Total external BYOK usage (in USD) for the API key' + description: 'Total external BYOK usage (in USD) for the API key. This is the inference cost OpenRouter records for requests served through your own provider keys, computed from token counts and configured prices, not the amount your provider invoices you. It is not included in the `usage*` fields.' example: 17.38 format: 'double' type: 'number' @@ -52637,7 +52637,7 @@ paths: format: 'double' type: 'number' byok_usage_monthly: - description: 'External BYOK usage (in USD) for current UTC month' + description: 'External BYOK usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st.' example: 17.38 format: 'double' type: 'number' @@ -52678,7 +52678,7 @@ paths: example: 'f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943' type: 'string' include_byok_in_limit: - description: 'Whether to include external BYOK usage in the credit limit' + description: 'Whether external BYOK usage counts toward this key''s limit. When false, only credit usage is checked against `limit`.' example: false type: 'boolean' label: @@ -52700,7 +52700,7 @@ paths: - 'number' - 'null' limit_remaining: - description: 'Remaining spending limit in USD' + description: 'Remaining spending limit in USD. Credit usage always counts toward `limit`; BYOK usage counts only when `include_byok_in_limit` is true.' example: 74.5 format: 'double' type: @@ -52723,22 +52723,22 @@ paths: - 'string' - 'null' usage: - description: 'Total OpenRouter credit usage (in USD) for the API key' + description: 'Total OpenRouter credit usage (in USD) for the API key: the spend allocated to this key, including requests funded from a credit pool. It is not a debit total for the account balance. It excludes external BYOK inference cost, which is reported separately in `byok_usage`, but a BYOK platform fee, where charged, is credit spend and is included here.' example: 25.5 format: 'double' type: 'number' usage_daily: - description: 'OpenRouter credit usage (in USD) for the current UTC day' + description: 'OpenRouter credit usage (in USD) for the current UTC day. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_monthly: - description: 'OpenRouter credit usage (in USD) for the current UTC month' + description: 'OpenRouter credit usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_weekly: - description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)' + description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday). Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' @@ -52862,7 +52862,7 @@ paths: example: false type: 'boolean' include_byok_in_limit: - description: 'Whether to include BYOK usage in the limit' + description: 'Whether external BYOK usage counts toward this key''s limit. When false, only credit usage is checked against `limit`.' example: true type: 'boolean' limit: @@ -52917,7 +52917,7 @@ paths: label: 'Updated API Key Name' last_used_at: '2026-09-15T15:45:00Z' limit: 75 - limit_remaining: 49.5 + limit_remaining: 32.12 limit_reset: 'daily' name: 'Updated API Key Name' updated_at: '2025-08-24T16:00:00Z' @@ -52943,7 +52943,7 @@ paths: label: 'Updated API Key Name' last_used_at: '2026-09-15T15:45:00Z' limit: 75 - limit_remaining: 49.5 + limit_remaining: 32.12 limit_reset: 'daily' name: 'Updated API Key Name' updated_at: '2025-08-24T16:00:00Z' @@ -52981,7 +52981,7 @@ paths: workspace_id: '0df9e665-d932-5740-b2c7-b52af166bc11' properties: byok_usage: - description: 'Total external BYOK usage (in USD) for the API key' + description: 'Total external BYOK usage (in USD) for the API key. This is the inference cost OpenRouter records for requests served through your own provider keys, computed from token counts and configured prices, not the amount your provider invoices you. It is not included in the `usage*` fields.' example: 17.38 format: 'double' type: 'number' @@ -52991,7 +52991,7 @@ paths: format: 'double' type: 'number' byok_usage_monthly: - description: 'External BYOK usage (in USD) for current UTC month' + description: 'External BYOK usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st.' example: 17.38 format: 'double' type: 'number' @@ -53032,7 +53032,7 @@ paths: example: 'f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943' type: 'string' include_byok_in_limit: - description: 'Whether to include external BYOK usage in the credit limit' + description: 'Whether external BYOK usage counts toward this key''s limit. When false, only credit usage is checked against `limit`.' example: false type: 'boolean' label: @@ -53054,7 +53054,7 @@ paths: - 'number' - 'null' limit_remaining: - description: 'Remaining spending limit in USD' + description: 'Remaining spending limit in USD. Credit usage always counts toward `limit`; BYOK usage counts only when `include_byok_in_limit` is true.' example: 74.5 format: 'double' type: @@ -53077,22 +53077,22 @@ paths: - 'string' - 'null' usage: - description: 'Total OpenRouter credit usage (in USD) for the API key' + description: 'Total OpenRouter credit usage (in USD) for the API key: the spend allocated to this key, including requests funded from a credit pool. It is not a debit total for the account balance. It excludes external BYOK inference cost, which is reported separately in `byok_usage`, but a BYOK platform fee, where charged, is credit spend and is included here.' example: 25.5 format: 'double' type: 'number' usage_daily: - description: 'OpenRouter credit usage (in USD) for the current UTC day' + description: 'OpenRouter credit usage (in USD) for the current UTC day. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_monthly: - description: 'OpenRouter credit usage (in USD) for the current UTC month' + description: 'OpenRouter credit usage (in USD) for the current UTC calendar month, resetting at 00:00 UTC on the 1st. Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' usage_weekly: - description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)' + description: 'OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday). Excludes external BYOK inference cost.' example: 25.5 format: 'double' type: 'number' @@ -56672,7 +56672,7 @@ paths: - 'Private Endpoints' x-speakeasy-name-override: 'list' post: - description: 'Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools`. The response does not echo `declared_parameters` or `tested_parameters`; read them with `GET /private-endpoints/{id}`. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Custom management keys with `private_endpoints:create` can only create drafts; passing `activate` requires a full organization Read/write management key and otherwise returns 403. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools`. The response does not echo `declared_parameters` or `tested_parameters`; read them with `GET /private-endpoints/{id}`. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'createPrivateEndpoint' parameters: - description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, pricing, or declared parameters) is rejected with 422 `idempotency_key_reused`. Declared parameters are compared as a set, so a retry that reorders or repeats a name replays the endpoint. `activate` and `settings` are not compared, and later edits to the endpoint do not affect the comparison. `settings` is still validated before the replay, so a retry with invalid settings returns 400 `settings_invalid` instead of the endpoint.'