Einstein Vision and Language API

GET Get API Usage

GET /v2/apiusage

Operation ID: getApiUsageV2. Tags: API Usage.

Each apiusage object in the response contains plan information for a single calendar month for a single license. If you have a six-month paid plan and you make this call on the first month, the response contains six apiusage objects; one for each calendar month in the plan. For more information about plans, see Rate Limits.

This the cURL request for this call.

curl -X GET -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" https://api.einstein.ai/v2/apiusage
  • If you're using the free tier, the response contains plan information only for the current month. You see plan information only after you make your first prediction. If you call the /apiusage resource before you make your first prediction call, the API returns an empty array.
  • If you're using the paid tier, the response contains plan information for each month in your plan starting with the current month.

The planData array contains an object for each plan type associated with the calendar month and the license. This code snippet shows the planData if the user has two Heroku GOLD plans.

"planData": [
       {
         "plan": "GOLD",
         "amount": 2,
         "source": "HEROKU"
       }
     ]

Responses

  • 200 API usage

    Media type: application/json. Schema: ApiUsageList.

  • 500 Failed to get usage