SparkCreditUsageTotal
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
GET |
/api/v1/organizations/{org_slug}/spark_credits/usage_totals |
load |
Month-to-date totals |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
spark_credit_usage_total, err := client.SparkCreditUsageTotal(nil).Load(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(spark_credit_usage_total)
Lua
Construct client as shown in the Lua setup, then call the operations:
local spark_credit_usage_total, err = client:SparkCreditUsageTotal():load({ organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$spark_credit_usage_total = $client->SparkCreditUsageTotal()->load(["organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
spark_credit_usage_total = client.SparkCreditUsageTotal().load({"organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
spark_credit_usage_total = client.SparkCreditUsageTotal.load({ "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const spark_credit_usage_total = await client.SparkCreditUsageTotal().load({ organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
compute_minutes_used |
string |
Yes | Compute Minutes Used |
compute_usd |
string |
Yes | Compute Usd |
inference_usd |
string |
Yes | Inference Usd |
load
GET /api/v1/organizations/{org_slug}/spark_credits/usage_totals
Operation ID: usage_totals_api_v1_spark_credits.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path |
string |
Yes |
Responses
200: Month-to-date totals
application/json
| Property | Type | Required | Description |
|---|---|---|---|
compute_minutes_used |
string |
Yes | |
compute_usd |
string |
Yes | |
inference_usd |
string |
Yes |