LogoLogo
AI TrainingUser Community
API Reference
API Reference
  • raia API
  • Users
  • Conversations
  • Prompts
  • Agents
  • Agent Files
  • Resource Usage Logs
  • Models
Powered by GitBook
On this page
Export as PDF

Resource Usage Logs

PreviousAgent FilesNextModels
CtrlK

Add new resource usage log.

post

Add new resource usage log using type and amount.

Authorizations
Body
typestring · enumRequired

The type of resource consumed

Example: OPENAI_TOKENSPossible values:
amountnumberRequired

The amount of resource consumed.

Example: 4567
Responses
201

Successfully add resource usage log.

403

Invalid API key or secret key. Ensure that you are using a valid authentication key.

application/json
500

Unexpected error occurred while processing the request. Please try again later.

application/json
post
POST /external/resource-usage HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "type": "OPENAI_TOKENS",
  "amount": 4567
}

No content