AiTranslator
此页面暂无中文版本,显示的是英文版本。
Get ai usage
Fetches ai usage by type(project or project type), item id, ?year and ?month
Authorization
BearerAuthObject AuthorizationBearer <token>
In: header
Query Parameters
limit?integer
Maximum number of project types to return (pagination limit)
Default
30offset?integer
Offset to start pagination
Default
0type*integer
Project(1) or project type(2)
aiTranslatorId*string
Id of ai translator
itemId*string
Id of project or project type
languageId?integer
Language id
year?integer
Year
month?integer
Month
sort?string
Filter projects by sort( -promptTokenRate,promptTokenRate, -completionTokenRate,completionTokenRate, -price,price, -year,year )
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/ai-usage?limit=30&offset=0&type=1&aiTranslatorId=d3cb3f65-5b8b-4620-8480-5165621e1112&itemId=d3cb3f65-5b8b-4620-8480-5165621e1112&languageId=1&year=2025&month=5&sort=-price"{ "aiUsage": [ { "id": "d3cb3f65-5b8b-4620-8480-5165621e1112", "type": 1, "year": 2025, "month": 4, "price": 17, "completionTokenCount": 10, "promptTokenCount": 30, "pricePrompt": 8.5, "priceCompletion": 8.5, "language": "Russian" } ], "pagination": { "maxCount": 20 }}{ "errors": { "type": [ "Type is required" ] }}{ "message": { "error": "Your request was made with invalid credentials." }}{ "message": { "error": "You are not allowed to perform this action." }}{ "message": { "error": "Oops! Something went wrong! Write to administrator. Your Request Id {f1177aee-9a99-42f0-a23f-4dd29fc39b65-672e0df972ccb}" }}