SPB Git

Repository Public

billing.md 25.4 KB 1,052 lines markdown

1<!-- source: https://docs.x.ai/developers/rest-api-reference/management/billing (from https://docs.x.ai/llms-full.txt, retrieved 2026-09-19T05:28:55Z) -->2#### Management API34# Billing Management56***78## GET /v1/billing/teams/\{team\_id}/billing-info910Get billing information of the team with given team ID.1112### Path Parameters1314* `team_id` (string, required) — Team ID of the team.1516### Response Body1718* `billingInfo` (object) — Billing info.1920  * `name` (string) — The customer's full name or business name.2122  * `address` (object) — Billing address.2324    * `line1` (string) — Address line 1 (e.g., street, PO Box, or company name).2526    * `line2` (string) — Address line 2 (e.g., apartment, suite, unit, or building).2728    * `city` (string) — City, district, suburb, town, or village.2930    * `country` (string) — Two-letter country code (\[ISO 3166-1 alpha-2]\(https://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2)).3132    * `postalCode` (string) — ZIP or postal code.3334    * `state` (string) — State, county, province, or region.3536  * `email` (string) — The customer's email.3738  * `taxIdType` (string)3940  * `taxNumber` (string)4142\*\*Response example:\*\*4344```json45{46  "billingInfo": {47    "name": "Acme Inc.",48    "address": {49      "line1": "123 Main St.",50      "line2": "",51      "city": "New York",52      "country": "US",53      "postalCode": "12345",54      "state": "New York"55    },56    "email": "foo@example.com",57    "taxIdType": "us_ein",58    "taxNumber": "12-3456789"59  }60}61```6263***6465## POST /v1/billing/teams/\{team\_id}/billing-info6667Set billing information of a team.6869### Path Parameters7071* `team_id` (string, required) — Team ID of the team.7273### Request Body7475* `billingInfo` (object) — Billing info.7677  * `name` (string) — The customer's full name or business name.7879  * `address` (object) — Billing address.8081    * `line1` (string) — Address line 1 (e.g., street, PO Box, or company name).8283    * `line2` (string) — Address line 2 (e.g., apartment, suite, unit, or building).8485    * `city` (string) — City, district, suburb, town, or village.8687    * `country` (string) — Two-letter country code (\[ISO 3166-1 alpha-2]\(https://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2)).8889    * `postalCode` (string) — ZIP or postal code.9091    * `state` (string) — State, county, province, or region.9293  * `email` (string) — The customer's email.9495  * `taxIdType` (string)9697  * `taxNumber` (string)9899\*\*Request example:\*\*100101```json102{103  "billingInfo": {104    "name": "Acme Inc.",105    "address": {106      "line1": "123 Main St.",107      "line2": "",108      "city": "New York",109      "country": "US",110      "postalCode": "12345",111      "state": "New York"112    },113    "email": "foo@example.com",114    "taxIdType": "us_ein",115    "taxNumber": "12-3456789"116  }117}118```119120\*\*Response example:\*\*121122```json123{}124```125126***127128## GET /v1/billing/teams/\{team\_id}/invoices129130List invoices that belong to a team.131132### Path Parameters133134* `team_id` (string, required) — Team ID of the team.135136### Query Parameters137138* `billingCycle.year` (integer)139140* `billingCycle.month` (integer)141142* `since.year` (integer)143144* `since.month` (integer)145146* `invoiceIds.invoiceIds` (array\<string>)147148### Response Body149150* `invoices` (array\<object>) — Invoices.151152  * `teamId` (string) — The Team ID.153154  * `invoiceId` (string) — The Invoice ID.155156  * `invoiceNumber` (string) — The Invoice number.157158  * `createTime` (string) — The creation time of the invoice.159160  * `invoiceStatus` ("INVALID" | "PENDING" | "PAID" | "WILL\_NEVER\_BE\_CHARGED" | "FAILED") — Charging status of the invoice.161162  * `firstDesiredNextCycleTs` (string) — When customer is expected to be charged.163164  * `chargerAttempts` (array\<object>)165166    * `ticket` (integer)167168    * `successful` (boolean)169170    * `paymentMethodId` (string) — The payment method that was tried in this attempt.171172  * `lines` (array\<object>) — List of items composing the invoice.173174    * `clusterName` (string) — The cluster on which the resource is consumed.175176    * `description` (string) — The description of the line item.177178    * `unitType` (string) — The unit in which the price is measured.179180    * `unitPrice` (string) — The price per unit (1/1\_000\_000 USD cents).181182    * `numUnits` (string) — The number of units.183184    * `amount` (string) — Total amount of the line item (USD cents).185186  * `subtotal` (string)187188  * `tax` (string) — without taxes in USD cents.189190  * `total` (string) — Total due for the invoice taxes included in USD cents.191192  * `invoicePdfAssetKeySuffix` (string) — The invoice pdf suffix.193194  * `monthly` (object)195196    * `billingCycle` (object)197198      * `year` (integer)199200      * `month` (integer)201202    * `defaultCreditsIssued` (object) — Representation of USD Cents.203204      * `val` (string)205206    * `autoCreditsIssued` (object) — Representation of USD Cents.207208      * `val` (string)209210    * `prepaidTokensToSpend` (object) — Representation of USD Cents.211212      * `val` (string)213214    * `billingItemsCsvAssetKeySuffix` (string) — The billing items csv file suffix, used by xAI processes.215216    * `correctionsCsvAssetKeySuffix` (string) — The billing items corrections csv file suffix, used by xAI processes.217218  * `prepaid` (object)219220  * `subscriptions` (object)221222\*\*Response example:\*\*223224```json225{226  "invoices": [227    {228      "teamId": "65c1e471-205f-4566-9c5a-07198bcdf4ce",229      "invoiceId": "aUa1nsnCQfxOFnWjqdimZczKKNJJ5xuwlkb-k0XiUOQ=",230      "invoiceNumber": "742-250-927-721",231      "createTime": "2025-04-01T21:19:48.569466Z",232      "invoiceStatus": "PAID",233      "firstDesiredNextCycleTs": "2025-04-11T02:46:58Z",234      "chargerAttempts": [235        {236          "ticket": 0,237          "successful": false,238          "paymentMethodId": ""239        },240        {241          "ticket": 1,242          "successful": true,243          "paymentMethodId": ""244        }245      ],246      "lines": [247        {248          "clusterName": "us-east-1",249          "description": "Chat grok-2-1212-1.0.0",250          "unitType": "Prompt text tokens",251          "unitPrice": "20000",252          "numUnits": "908",253          "amount": "0"254        },255        {256          "clusterName": "us-east-1",257          "description": "Chat grok-2-1212-1.0.0",258          "unitType": "Completion text tokens",259          "unitPrice": "100000",260          "numUnits": "534",261          "amount": "0"262        }263      ],264      "subtotal": "0",265      "tax": "0",266      "total": "0",267      "invoicePdfAssetKeySuffix": "teams/65c1e471-205f-4566-9c5a-07198bcdf4ce/billing/2025-2-aUa1nsnCQfxOFnWjqdimZczKKNJJ5xuwlkb-k0XiUOQ=.pdf",268      "monthly": {269        "billingCycle": {270          "year": 2025,271          "month": 2272        },273        "defaultCreditsIssued": {274          "val": "0"275        },276        "autoCreditsIssued": {277          "val": "0"278        },279        "prepaidTokensToSpend": {280          "val": "0"281        },282        "billingItemsCsvAssetKeySuffix": "teams/65c1e471-205f-4566-9c5a-07198bcdf4ce/billing/2025-2-aUa1nsnCQfxOFnWjqdimZczKKNJJ5xuwlkb-k0XiUOQ=-billing_items.csv.zstd",283        "correctionsCsvAssetKeySuffix": "teams/65c1e471-205f-4566-9c5a-07198bcdf4ce/billing/2025-2-aUa1nsnCQfxOFnWjqdimZczKKNJJ5xuwlkb-k0XiUOQ=-corrections.csv.zstd"284      }285    }286  ]287}288```289290***291292## GET /v1/billing/teams/\{team\_id}/payment-method293294List payment methods of a team. You can add or delete the payment methods on https://console.x.ai.295296### Path Parameters297298* `team_id` (string, required) — Team ID of the team.299300### Response Body301302* `paymentMethods` (array\<object>) — Payment methods on file.303304  * `paymentMethodId` (string)305306  * `billingInfo` (object) — Billing info.307308    * `name` (string) — The customer's full name or business name.309310    * `address` (object) — Billing address.311312      * `line1` (string) — Address line 1 (e.g., street, PO Box, or company name).313314      * `line2` (string) — Address line 2 (e.g., apartment, suite, unit, or building).315316      * `city` (string) — City, district, suburb, town, or village.317318      * `country` (string) — Two-letter country code (\[ISO 3166-1 alpha-2]\(https://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2)).319320      * `postalCode` (string) — ZIP or postal code.321322      * `state` (string) — State, county, province, or region.323324    * `email` (string) — The customer's email.325326    * `taxIdType` (string)327328    * `taxNumber` (string)329330  * `cardDetails` (object) — A redacted version of card details. The actual card details are handled by third-party payment providers.331332    * `brand` (string) — Card brand.333      Can be \`amex\`, \`diners\`, \`discover\`, \`eftpos\_au\`, \`jcb\`, \`mastercard\`, \`unionpay\`, \`visa\`, or \`unknown\`.334335    * `expMonth` (string) — Two-digit number representing the card's expiration month.336337    * `expYear` (string) — Four-digit number representing the card's expiration year.338339    * `last4` (string) — The last four digits of the card.340341  * `usBankAccountDetails` (object) — ACH details.342343    * `bankName` (string)344345    * `last4` (string)346347    * `routingNumber` (string)348349    * `blocked` (object) — ACH blocked reason.350351      * `networkCode` (string)352353      * `blockReason` (string)354355  * `linkDetails` (object) — Link payment details.356357    * `email` (string)358359  * `paymentType` (string)360361  * `addedTs` (string)362363* `pendingPaymentMethod` (object) — Represents an incomplete attempt to add a payment method.364  Might resolve into a payment method.365366  * `achMicrodepositHostedVerificationUrl` (string) — Verification URL for ACH micro deposits that verifies the account.367368\*\*Response example:\*\*369370```json371{372  "paymentMethods": [373    {374      "paymentMethodId": "pm_xxxxxxxxxxxxxxxxxxxxxxxx",375      "billingInfo": {376        "name": "Acme Inc.",377        "address": {378          "line1": "123 Main St.",379          "line2": "",380          "city": "New York",381          "country": "US",382          "postalCode": "12345",383          "state": "New York"384        },385        "email": "foo@example.com",386        "taxIdType": "us-ein",387        "taxNumber": "123-3456789"388      },389      "cardDetails": {390        "brand": "mastercard",391        "expMonth": "12",392        "expYear": "2030",393        "last4": "4444"394      },395      "usBankAccountDetails": null,396      "linkDetails": null,397      "paymentType": "card"398    }399  ],400  "pendingPaymentMethod": null401}402```403404***405406## POST /v1/billing/teams/\{team\_id}/payment-method/default407408Set default payment method to an existing payment method on file.409410### Path Parameters411412* `team_id` (string, required) — Team ID of the team.413414### Request Body415416* `paymentMethodId` (string) — ID of the payment method that you want to set as default.417418\*\*Request example:\*\*419420```json421{422  "paymentMethodId": "pm_xxxxxxxxxxxxxxxxxxxxxxxx"423}424```425426\*\*Response example:\*\*427428```json429{}430```431432***433434## GET /v1/billing/teams/\{team\_id}/postpaid/invoice/preview435436Preview the amount to pay for postpaid usage in the current billing period.437438### Path Parameters439440* `team_id` (string, required) — Team ID of the team.441442### Response Body443444* `coreInvoice` (object) — The invoice object.445446  * `lines` (array\<object>) — Line items on the invoice.447448    * `clusterName` (string) — The cluster on which the resource is consumed.449450    * `description` (string) — The description of the line item.451452    * `unitType` (string) — The unit in which the price is measured.453454    * `unitPrice` (string) — The price per unit (1/1\_000\_000 USD cents).455456    * `numUnits` (string) — The number of units.457458    * `amount` (string) — Total amount of the line item (USD cents).459460  * `amountBeforeVatLimited` (object) — Representation of USD Cents.461462    * `val` (string)463464  * `amountBeforeVatUnlimited` (object) — Representation of USD Cents.465466    * `val` (string)467468  * `amountBeforeVatLimitedAndUnlimited` (object) — Representation of USD Cents.469470    * `val` (string)471472  * `amountBeforeVat` (string)473474  * `vatCost` (string) — VAT (USD cents).475476  * `amountAfterVat` (string) — Total amount after VAT (USD cents).477478  * `autoCreditsIssued` (string) — Automatically issued credits (USD cents).479480  * `defaultCreditsIssued` (string) — Default credit issued (USD cents).481482  * `totalWithCorr` (object) — Representation of USD Cents.483484    * `val` (string)485486  * `prepaidCredits` (object) — Representation of USD Cents.487488    * `val` (string)489490  * `prepaidCreditsUsed` (object) — Representation of USD Cents.491492    * `val` (string)493494* `effectiveSpendingLimit` (string) — The effective current spending limit in USD cents.495496* `defaultCredits` (string) — The current default credits in USD cents.497498* `billingCycle` (object)499500  * `year` (integer)501502  * `month` (integer)503504\*\*Response example:\*\*505506```json507{508  "coreInvoice": {509    "lines": [],510    "amountBeforeVat": "0",511    "vatCost": "0",512    "amountAfterVat": "0",513    "autoCreditsIssued": "0",514    "defaultCreditsIssued": "0",515    "totalWithCorr": {516      "val": "0"517    },518    "prepaidCredits": {519      "val": "-4500"520    },521    "prepaidCreditsUsed": {522      "val": "0"523    }524  },525  "effectiveSpendingLimit": "20000",526  "defaultCredits": "0",527  "billingCycle": {528    "year": 2025,529    "month": 11530  }531}532```533534***535536## GET /v1/billing/teams/\{team\_id}/postpaid/spending-limits537538Get the postpaid monthly spending limits. The API will stop functioning once the team has consumed all of the539prepaid credits, and the postpaid usage amount has reached the user-set soft spending limit.540541### Path Parameters542543* `team_id` (string, required) — Team ID of the team.544545### Response Body546547* `spendingLimits` (object) — Postpaid monthly spending limit.548549  Override might not exist, hence optional (actually, this comes from550  &#x20;either default hard\_spending\_limit override or monthly551  &#x20;hard\_spending\_limit override).552553  * `hardSlOverride` (object) — Representation of USD Cents.554555    * `val` (string)556557  * `hardSlAuto` (object) — Representation of USD Cents.558559    * `val` (string)560561  * `effectiveHardSl` (object) — Representation of USD Cents.562563    * `val` (string)564565  * `softSl` (object) — Representation of USD Cents.566567    * `val` (string)568569  * `effectiveSl` (object) — Representation of USD Cents.570571    * `val` (string)572573\*\*Response example:\*\*574575```json576{577  "spendingLimits": {578    "hardSlAuto": {579      "val": "22500"580    },581    "effectiveHardSl": {582      "val": "22500"583    },584    "softSl": {585      "val": "20000"586    },587    "effectiveSl": {588      "val": "20000"589    }590  }591}592```593594***595596## POST /v1/billing/teams/\{team\_id}/postpaid/spending-limits597598Set the postpaid monthly spending limit of a team. This can be used to restrict the maximum amount of postpaid API599usage. Note this will not limit the amount of prepaid credit usage, and prepaid credits will always be consumed600before accruing postpaid usage. To use only prepaid credits, you can set this limit to 0.601602### Path Parameters603604* `team_id` (string, required) — Team ID.605606### Request Body607608* `desiredSoftSpendingLimit` (object) — Representation of USD Cents.609610  * `val` (string)611612### Response Body613614* `thisBpSoftSpendingLimit` (object) — Representation of USD Cents.615616  * `val` (string)617618\*\*Request example:\*\*619620```json621{622  "desiredSoftSpendingLimit": {623    "val": "20000"624  }625}626```627628\*\*Response example:\*\*629630```json631{632  "thisBpSoftSpendingLimit": {633    "val": "20000"634  }635}636```637638***639640## GET /v1/billing/teams/\{team\_id}/prepaid/balance641642List the prepaid credit balance and balance changes of a team.643644### Path Parameters645646* `team_id` (string, required) — The team ID of the team.647648### Response Body649650* `changes` (array\<object>) — The changes of the prepaid credit balance.651652  * `teamId` (string) — The team ID.653654  * `changeOrigin` ("INVALID\_ORIGIN" | "PURCHASE" | "SPEND" | "REFUND" | "MANUAL" | "AUTO\_PURCHASE") — The reason for the change.655656    &#x20;\- PURCHASE: Purchase by user. \`amount\` field will be negative.657    &#x20;\- SPEND: Spending by user. \`amount\` field will be positive.658    &#x20;\- REFUND: A refund issued to user. \`amount\` field will be negative.659    &#x20;\- MANUAL: Can be either positive or negative, performed by xAI staff.660    &#x20;\- AUTO\_PURCHASE: Can only be negative.661662  * `topupStatus` ("INVALID\_STATUS" | "TO\_GENERATE\_INVOICE" | "FAILED\_TO\_GEMNERATE\_INVOICE" | "TO\_CHARGE" | "FAILED\_TO\_CHARGE" | "SUCCEEDED") — Status of the top up.663664  * `amount` (object) — Representation of USD Cents.665666    * `val` (string)667668  * `invoiceId` (string) — Invoice ID.669670  * `invoiceNumber` (string) — Invoice number.671672  * `createTime` (string) — Creation time of the invoice.673674  * `spendBpKeyYear` (integer) — Calendar year the purchase is made in.675676  * `spendBpKeyMonth` (integer) — Calendar month the purchase is made in.677678  * `createTs` (string) — Creation timestamp.679680  * `paymentProcessor` (object)681682    * `kind` ("UNKNOWN" | "STRIPE" | "CHECKOUT" | "EXTERNAL" | "MANUAL")683684    * `externalParty` (string)685686    * `externalInvoiceId` (string)687688* `total` (object) — Representation of USD Cents.689690  * `val` (string)691692\*\*Response example:\*\*693694```json695{696  "changes": [697    {698      "teamId": "65c1e471-205f-4566-9c5a-07198bcdf4ce",699      "changeOrigin": "PURCHASE",700      "topupStatus": "SUCCEEDED",701      "amount": {702        "val": "-1000"703      },704      "invoiceId": "7v7blf6c1G2g34OdI4N5tD1CKCdag4ZYLhn5vTBLIMM=",705      "invoiceNumber": "062-446-653-166",706      "createTime": "2025-02-24T15:28:02.308840Z",707      "paymentProcessor": {708        "kind": "STRIPE"709      }710    }711  ],712  "total": {713    "val": "-1000"714  }715}716```717718***719720## POST /v1/billing/teams/\{team\_id}/prepaid/top-up721722Top up prepaid credit using the default payment method.723724### Path Parameters725726* `team_id` (string, required) — Team ID of the team to top up for.727728### Request Body729730* `amount` (object) — Representation of USD Cents.731732  * `val` (string)733734### Response Body735736* `change` (object) — Change item on the prepaid credit balance.737738  * `teamId` (string) — The team ID.739740  * `changeOrigin` ("INVALID\_ORIGIN" | "PURCHASE" | "SPEND" | "REFUND" | "MANUAL" | "AUTO\_PURCHASE") — The reason for the change.741742    &#x20;\- PURCHASE: Purchase by user. \`amount\` field will be negative.743    &#x20;\- SPEND: Spending by user. \`amount\` field will be positive.744    &#x20;\- REFUND: A refund issued to user. \`amount\` field will be negative.745    &#x20;\- MANUAL: Can be either positive or negative, performed by xAI staff.746    &#x20;\- AUTO\_PURCHASE: Can only be negative.747748  * `topupStatus` ("INVALID\_STATUS" | "TO\_GENERATE\_INVOICE" | "FAILED\_TO\_GEMNERATE\_INVOICE" | "TO\_CHARGE" | "FAILED\_TO\_CHARGE" | "SUCCEEDED") — Status of the top up.749750  * `amount` (object) — Representation of USD Cents.751752    * `val` (string)753754  * `invoiceId` (string) — Invoice ID.755756  * `invoiceNumber` (string) — Invoice number.757758  * `createTime` (string) — Creation time of the invoice.759760  * `spendBpKeyYear` (integer) — Calendar year the purchase is made in.761762  * `spendBpKeyMonth` (integer) — Calendar month the purchase is made in.763764  * `createTs` (string) — Creation timestamp.765766  * `paymentProcessor` (object)767768    * `kind` ("UNKNOWN" | "STRIPE" | "CHECKOUT" | "EXTERNAL" | "MANUAL")769770    * `externalParty` (string)771772    * `externalInvoiceId` (string)773774\*\*Request example:\*\*775776```json777{778  "amount": {779    "val": "500"780  }781}782```783784\*\*Response example:\*\*785786```json787{788  "change": {789    "teamId": "65c1e471-205f-4566-9c5a-07198bcdf4ce",790    "changeOrigin": "PURCHASE",791    "topupStatus": "TO_CHARGE",792    "amount": {793      "val": "-500"794    },795    "createTime": "2025-11-13T14:02:21.309537Z",796    "createTs": "2025-11-13T14:02:21.309537Z",797    "paymentProcessor": {798      "kind": "STRIPE"799    }800  }801}802```803804***805806## POST /v1/billing/teams/\{team\_id}/usage807808Get historical usage of the API over a time period, aggregated by fields.809810### Path Parameters811812* `team_id` (string, required) — The team whose billing records to analyze.813814### Request Body815816* `analyticsRequest` (object) — Request body for analytics.817818  * `timeRange` (object) — Allows the user to specify a time range in their local timezone. Because of the way we aggregate819    logs, we can't rely on UTC timestamps.820821    * `startTime` (string) — The from-time in the format YYYY-MM-DD HH:MM:SS.822823    * `endTime` (string) — The to-time in the format YYYY-MM-DD HH:MM:SS (not including).824825    * `timezone` (string) — The timezone that all timestamps are reported in.826      The timezone must be represented by the IANA time zone identifier (e.g. America/New\_York).827828  * `timeUnit` ("TIME\_UNIT\_INVALID" | "TIME\_UNIT\_MONTH" | "TIME\_UNIT\_CALENDAR\_WEEK" | "TIME\_UNIT\_DAY" | "TIME\_UNIT\_HOUR" | "TIME\_UNIT\_QUARTER\_HOUR" | "TIME\_UNIT\_MINUTE" | "TIME\_UNIT\_SECOND" | "TIME\_UNIT\_NONE") — Time series are created by aggregating value into buckets we call \`TimeUnit\`.829830    &#x20;\- TIME\_UNIT\_NONE: None means having one single time bucket for all events.831    This can be used to count total number of events ever for example.832833  * `values` (array\<object>) — Name of the fields to aggregate.834835    * `name` (string) — Name of the field to measure.836837    * `aggregation` ("AGGREGATION\_NONE" | "AGGREGATION\_SUM" | "AGGREGATION\_AVG" | "AGGREGATION\_VAR" | "AGGREGATION\_STD" | "AGGREGATION\_MIN" | "AGGREGATION\_MAX" | "AGGREGATION\_P50" | "AGGREGATION\_P90" | "AGGREGATION\_P99" | "AGGREGATION\_P999" | "AGGREGATION\_COUNT" | "AGGREGATION\_COUNT\_DISTINCT") — Each value is an aggregate of the individual values in the time bucket. Note that not every field838      supports every aggregation method.839840  * `groupBy` (array\<string>) — For each value of the group-by tuple, we return one time series.841842  * `filters` (array\<string>) — All filter conditions are combined using AND.843844### Response Body845846* `timeSeries` (array\<object>) — For each value of the group-by clause, we return one time series.847848  * `group` (array\<string>) — Values of the fields that were grouped by.849850  * `groupLabels` (array\<string>) — Values to group the time series by.851852  * `dataPoints` (array\<object>) — Data points ordered by timestamp. Data points are dense in the range provided (meaning we853    return one data point for every interval in the requested time range).854855    * `timestamp` (string) — The timestamp (in UTC) when the data point was recorded.856857    * `values` (array\<number>) — The values that were recorded at that datapoint.858859* `limitReached` (boolean) — If this is true, the maximum cardinality of the query has been reached and only a subset of860  results is returned.861862\*\*Request example:\*\*863864```json865{866  "analyticsRequest": {867    "timeRange": {868      "startTime": "2025-10-01 00:00:00",869      "endTime": "2025-10-07 23:59:59",870      "timezone": "Etc/GMT"871    },872    "timeUnit": "TIME_UNIT_DAY",873    "values": [874      {875        "name": "usd",876        "aggregation": "AGGREGATION_SUM"877      }878    ],879    "groupBy": [880      "description"881    ],882    "filters": []883  }884}885```886887\*\*Response example:\*\*888889```json890{891  "timeSeries": [892    {893      "group": [894        "Chat grok-4-0709"895      ],896      "groupLabels": [897        "Chat grok-4-0709"898      ],899      "dataPoints": [900        {901          "timestamp": "2025-10-01T00:00:00Z",902          "values": [903            0.75973725904          ]905        },906        {907          "timestamp": "2025-10-02T00:00:00Z",908          "values": [909            0910          ]911        },912        {913          "timestamp": "2025-10-03T00:00:00Z",914          "values": [915            0916          ]917        },918        {919          "timestamp": "2025-10-04T00:00:00Z",920          "values": [921            0922          ]923        },924        {925          "timestamp": "2025-10-05T00:00:00Z",926          "values": [927            0928          ]929        },930        {931          "timestamp": "2025-10-06T00:00:00Z",932          "values": [933            0934          ]935        },936        {937          "timestamp": "2025-10-07T00:00:00Z",938          "values": [939            0940          ]941        }942      ]943    },944    {945      "group": [946        "Chat grok-4-fast-non-reasoning"947      ],948      "groupLabels": [949        "Chat grok-4-fast-non-reasoning"950      ],951      "dataPoints": [952        {953          "timestamp": "2025-10-01T00:00:00Z",954          "values": [955            0956          ]957        },958        {959          "timestamp": "2025-10-02T00:00:00Z",960          "values": [961            0.0001037962          ]963        },964        {965          "timestamp": "2025-10-03T00:00:00Z",966          "values": [967            0968          ]969        },970        {971          "timestamp": "2025-10-04T00:00:00Z",972          "values": [973            0974          ]975        },976        {977          "timestamp": "2025-10-05T00:00:00Z",978          "values": [979            0980          ]981        },982        {983          "timestamp": "2025-10-06T00:00:00Z",984          "values": [985            0986          ]987        },988        {989          "timestamp": "2025-10-07T00:00:00Z",990          "values": [991            0992          ]993        }994      ]995    },996    {997      "group": [998        "grok-2-image-1212"999      ],1000      "groupLabels": [1001        "grok-2-image-1212"1002      ],1003      "dataPoints": [1004        {1005          "timestamp": "2025-10-01T00:00:00Z",1006          "values": [1007            01008          ]1009        },1010        {1011          "timestamp": "2025-10-02T00:00:00Z",1012          "values": [1013            01014          ]1015        },1016        {1017          "timestamp": "2025-10-03T00:00:00Z",1018          "values": [1019            0.141020          ]1021        },1022        {1023          "timestamp": "2025-10-04T00:00:00Z",1024          "values": [1025            01026          ]1027        },1028        {1029          "timestamp": "2025-10-05T00:00:00Z",1030          "values": [1031            01032          ]1033        },1034        {1035          "timestamp": "2025-10-06T00:00:00Z",1036          "values": [1037            01038          ]1039        },1040        {1041          "timestamp": "2025-10-07T00:00:00Z",1042          "values": [1043            01044          ]1045        }1046      ]1047    }1048  ],1049  "limitReached": false1050}1051```1052
Files main
Menu

Theme