Authorizations
Path Parameters
Query Parameters
Response
Successful Response
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const modelUsage = await client.models.deployments.usageStatistics.retrieve('model_deployment_id', {
chunks: 0,
end_date: '2019-12-27T18:11:19.117Z',
start_date: '2019-12-27T18:11:19.117Z',
});
console.log(modelUsage.data);
{
"data": [
{
"date": "2023-11-07T05:31:56Z",
"prompt_tokens": 123,
"response_tokens": 123,
"summary_tokens": 123
}
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
}
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const modelUsage = await client.models.deployments.usageStatistics.retrieve('model_deployment_id', {
chunks: 0,
end_date: '2019-12-27T18:11:19.117Z',
start_date: '2019-12-27T18:11:19.117Z',
});
console.log(modelUsage.data);
{
"data": [
{
"date": "2023-11-07T05:31:56Z",
"prompt_tokens": 123,
"response_tokens": 123,
"summary_tokens": 123
}
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
}
Successful Response
The list of data points for the given period
Show child attributes
The start date of the data points. Equal to the first date in the data list
The end date of the data points. Equal to the last date in the data list