Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ public partial interface IServerlessClient
/// machine prices and net of discounts. This matches the serverless portion of the<br/>
/// dashboard usage view. Unlike `/v1/models/usage` (which reports model API<br/>
/// endpoint calls), this reports the `sdk_billing_event` compute spend of the apps<br/>
/// you run on fal Serverless. Authenticate with your own API key (no admin/org key<br/>
/// required); results are always scoped to the apps you own.<br/>
/// you run on fal Serverless. Requires an `ADMIN`-scoped API key (this endpoint<br/>
/// returns billing and usage data, which the standard `API` key scope does not<br/>
/// include); results are always scoped to the apps you own.<br/>
/// **Filtering by app:**<br/>
/// - `app` — exact match on one or more app names (comma-separated or repeated,<br/>
/// up to 50): `?app=my-app-dev,my-app-prod`. Use the value exactly as it appears<br/>
Expand Down Expand Up @@ -104,8 +105,9 @@ public partial interface IServerlessClient
/// machine prices and net of discounts. This matches the serverless portion of the<br/>
/// dashboard usage view. Unlike `/v1/models/usage` (which reports model API<br/>
/// endpoint calls), this reports the `sdk_billing_event` compute spend of the apps<br/>
/// you run on fal Serverless. Authenticate with your own API key (no admin/org key<br/>
/// required); results are always scoped to the apps you own.<br/>
/// you run on fal Serverless. Requires an `ADMIN`-scoped API key (this endpoint<br/>
/// returns billing and usage data, which the standard `API` key scope does not<br/>
/// include); results are always scoped to the apps you own.<br/>
/// **Filtering by app:**<br/>
/// - `app` — exact match on one or more app names (comma-separated or repeated,<br/>
/// up to 50): `?app=my-app-dev,my-app-prod`. Use the value exactly as it appears<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ partial void ProcessServerlessGetUsageResponseContent(
/// machine prices and net of discounts. This matches the serverless portion of the<br/>
/// dashboard usage view. Unlike `/v1/models/usage` (which reports model API<br/>
/// endpoint calls), this reports the `sdk_billing_event` compute spend of the apps<br/>
/// you run on fal Serverless. Authenticate with your own API key (no admin/org key<br/>
/// required); results are always scoped to the apps you own.<br/>
/// you run on fal Serverless. Requires an `ADMIN`-scoped API key (this endpoint<br/>
/// returns billing and usage data, which the standard `API` key scope does not<br/>
/// include); results are always scoped to the apps you own.<br/>
/// **Filtering by app:**<br/>
/// - `app` — exact match on one or more app names (comma-separated or repeated,<br/>
/// up to 50): `?app=my-app-dev,my-app-prod`. Use the value exactly as it appears<br/>
Expand Down Expand Up @@ -177,8 +178,9 @@ partial void ProcessServerlessGetUsageResponseContent(
/// machine prices and net of discounts. This matches the serverless portion of the<br/>
/// dashboard usage view. Unlike `/v1/models/usage` (which reports model API<br/>
/// endpoint calls), this reports the `sdk_billing_event` compute spend of the apps<br/>
/// you run on fal Serverless. Authenticate with your own API key (no admin/org key<br/>
/// required); results are always scoped to the apps you own.<br/>
/// you run on fal Serverless. Requires an `ADMIN`-scoped API key (this endpoint<br/>
/// returns billing and usage data, which the standard `API` key scope does not<br/>
/// include); results are always scoped to the apps you own.<br/>
/// **Filtering by app:**<br/>
/// - `app` — exact match on one or more app names (comma-separated or repeated,<br/>
/// up to 50): `?app=my-app-dev,my-app-prod`. Use the value exactly as it appears<br/>
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Fal/Generated/autosdk.generated-examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@
"Order": 59,
"Title": "Usage",
"Slug": "serverlessgetusage",
"Description": "Time-bucketed, aggregated serverless compute usage for **your own account** \u2014\nthe machine-seconds your deployed serverless apps consumed, priced with your\nmachine prices and net of discounts. This matches the serverless portion of the\ndashboard usage view. Unlike \u0060/v1/models/usage\u0060 (which reports model API\nendpoint calls), this reports the \u0060sdk_billing_event\u0060 compute spend of the apps\nyou run on fal Serverless. Authenticate with your own API key (no admin/org key\nrequired); results are always scoped to the apps you own.\n\n**Filtering by app:**\n- \u0060app\u0060 \u2014 exact match on one or more app names (comma-separated or repeated,\n up to 50): \u0060?app=my-app-dev,my-app-prod\u0060. Use the value exactly as it appears\n in the response \u0060app\u0060 field.\n- \u0060search\u0060 \u2014 case-insensitive substring match on the app name, for when you\n know the name but not the exact environment/version suffix: \u0060?search=my-app\u0060\n returns every \u0060my-app*\u0060 variant.\n- Provide both to AND them. Omit both to return every app you own \u2014 useful for\n discovering the exact app names to filter on.\n\n**Expansions:**\n- \u0060time_series\u0060: usage grouped into time buckets (default)\n- \u0060summary\u0060: a single aggregate row per app \u00D7 machine type across the window\n\n**Notes:**\n- Each row is machine-seconds (\u0060unit\u0060 is always \u0060\u0022second\u0022\u0060); surge and\n non-surge usage of the same app/machine come back as separate rows\n (\u0060is_surge\u0060), so sum across them for a per-app total.\n- Time-series \u0060bucket\u0060 timestamps are returned in the \u0060timezone\u0060 you request\n (ISO 8601 with offset, e.g. \u00602025-01-15T00:00:00-05:00\u0060), which also controls\n how usage is grouped into buckets.\n\n**Common Use Cases:**\n- Track your serverless apps\u0027 compute consumption and cost over time\n- Break down spend per app, environment, and machine type\n- Export usage to your own billing/observability tooling",
"Description": "Time-bucketed, aggregated serverless compute usage for **your own account** \u2014\nthe machine-seconds your deployed serverless apps consumed, priced with your\nmachine prices and net of discounts. This matches the serverless portion of the\ndashboard usage view. Unlike \u0060/v1/models/usage\u0060 (which reports model API\nendpoint calls), this reports the \u0060sdk_billing_event\u0060 compute spend of the apps\nyou run on fal Serverless. Requires an \u0060ADMIN\u0060-scoped API key (this endpoint\nreturns billing and usage data, which the standard \u0060API\u0060 key scope does not\ninclude); results are always scoped to the apps you own.\n\n**Filtering by app:**\n- \u0060app\u0060 \u2014 exact match on one or more app names (comma-separated or repeated,\n up to 50): \u0060?app=my-app-dev,my-app-prod\u0060. Use the value exactly as it appears\n in the response \u0060app\u0060 field.\n- \u0060search\u0060 \u2014 case-insensitive substring match on the app name, for when you\n know the name but not the exact environment/version suffix: \u0060?search=my-app\u0060\n returns every \u0060my-app*\u0060 variant.\n- Provide both to AND them. Omit both to return every app you own \u2014 useful for\n discovering the exact app names to filter on.\n\n**Expansions:**\n- \u0060time_series\u0060: usage grouped into time buckets (default)\n- \u0060summary\u0060: a single aggregate row per app \u00D7 machine type across the window\n\n**Notes:**\n- Each row is machine-seconds (\u0060unit\u0060 is always \u0060\u0022second\u0022\u0060); surge and\n non-surge usage of the same app/machine come back as separate rows\n (\u0060is_surge\u0060), so sum across them for a per-app total.\n- Time-series \u0060bucket\u0060 timestamps are returned in the \u0060timezone\u0060 you request\n (ISO 8601 with offset, e.g. \u00602025-01-15T00:00:00-05:00\u0060), which also controls\n how usage is grouped into buckets.\n\n**Common Use Cases:**\n- Track your serverless apps\u0027 compute consumption and cost over time\n- Break down spend per app, environment, and machine type\n- Export usage to your own billing/observability tooling",
"Language": "csharp",
"Code": "using var client = new FalClient(apiKey);\nvar response = await client.Serverless.ServerlessGetUsageAsync();\n\n// Example response:\n// {\n// \u0022time_series\u0022: [\n// {\n// \u0022bucket\u0022: \u00222025-01-15T00:00:00-05:00\u0022,\n// \u0022results\u0022: [\n// {\n// \u0022app\u0022: \u0022my-app-prod\u0022,\n// \u0022environment\u0022: null,\n// \u0022machine_type\u0022: \u0022GPU-H100\u0022,\n// \u0022unit\u0022: \u0022second\u0022,\n// \u0022quantity\u0022: 1200,\n// \u0022unit_price\u0022: 0.00099,\n// \u0022cost\u0022: 1.188,\n// \u0022currency\u0022: \u0022USD\u0022,\n// \u0022is_surge\u0022: false\n// }\n// ]\n// }\n// ],\n// \u0022next_cursor\u0022: null,\n// \u0022has_more\u0022: false\n// }",
"Format": "sdk",
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Fal/openapi.json

Large diffs are not rendered by default.