الانتقال إلى المحتوى الرئيسي
GET
/
billing
/
usage
/api/v1/billing/usage
curl --request GET \
  --url https://api.venice.ai/api/v1/billing/usage \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "amount": -0.1,
      "currency": "DIEM",
      "inferenceDetails": null,
      "notes": "API Inference",
      "pricePerUnitUsd": 0.1,
      "sku": "grok-imagine-image-image-unit",
      "timestamp": {},
      "units": 1
    },
    {
      "amount": -0.06356,
      "currency": "DIEM",
      "inferenceDetails": {
        "completionTokens": 227,
        "inferenceExecutionTime": 2964,
        "promptTokens": 339,
        "requestId": "chatcmpl-4007fd29f42b7d3c4107f4345e8d174a"
      },
      "notes": "API Inference",
      "pricePerUnitUsd": 2.8,
      "sku": "zai-org-glm-5-1-llm-output-mtoken",
      "timestamp": {},
      "units": 0.000227
    }
  ],
  "pagination": {
    "limit": 1,
    "page": 200,
    "total": 56090,
    "totalPages": 56090
  }
}
تُصدِّر بيانات الاستخدام لمستخدم ما. يمكن العثور على أوصاف حقول الاستجابة أدناه:
  • timestamp: الطابع الزمني الذي تم فيه إنشاء سجل استخدام الفوترة
  • sku: المنتج المرتبط بسجل استخدام الفوترة
  • pricePerUnitUsd: سعر الوحدة بالدولار الأمريكي
  • unit: عدد الوحدات المستهلكة
  • amount: المبلغ الإجمالي المُحاسَب عليه لسجل استخدام الفوترة
  • currency: العملة المُحاسَب بها سجل استخدام الفوترة
  • notes: ملاحظات حول سجل استخدام الفوترة
  • inferenceDetails.requestId: معرّف الطلب المرتبط بعملية الاستدلال
  • inferenceDetails.inferenceExecutionTime: الوقت المستغرق لتنفيذ الاستدلال بالميلي ثانية
  • inferenceDetails.promptTokens: عدد الـ tokens المطلوبة في الـ prompt. متوفر فقط لاستخدام نماذج LLM.
  • inferenceDetails.completionTokens: عدد الـ tokens المستخدمة في الإكمال. متوفر فقط لاستخدام نماذج LLM.

التفويضات

Authorization
string
header
مطلوب

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

الترويسات

Accept
string

Accept header to specify the response format

مثال:

"application/json, text/csv"

معلمات الاستعلام

currency
enum<string>

Filter by currency

الخيارات المتاحة:
USD,
VCU,
DIEM,
BUNDLED_CREDITS
مثال:

"USD"

endDate
string<date-time>

End date for filtering records (ISO 8601)

مثال:

"2024-12-31T23:59:59.000Z"

limit
integer
افتراضي:200

Number of items per page

النطاق المطلوب: 0 < x <= 500
مثال:

200

page
integer
افتراضي:1

Page number for pagination

النطاق المطلوب: x > 0
مثال:

1

sortOrder
enum<string>
افتراضي:desc

Sort order for createdAt field

الخيارات المتاحة:
asc,
desc
مثال:

"desc"

startDate
string<date-time>

Start date for filtering records (ISO 8601)

مثال:

"2024-01-01T00:00:00.000Z"

الاستجابة

Successful response

The response schema for the billing usage endpoint

data
object[]
مطلوب
pagination
object
مطلوب
warningMessage
string

A warning message to disambiguate DIEM usage from legacy DIEM (formerly VCU) usage