HydraCore
API by router

Usage internal

Record Usage

POST
/internal/v1/instances/{instance_id}/usage

Path Parameters

instance_id*Instance Id
Formatuuid

Request Body

application/json
  1. body
conversation_id?string|null
cost_platform_usd?number|null
cost_tenant_usd?number|null
duration_seconds?number|null
is_byok?Is Byok
Defaultfalse
key_source?Key Source
Lengthlength <= 20
Default"platform"
modality*Modality
Lengthlength <= 30
model_slug*Model Slug
Lengthlength <= 100
provider*Provider
Lengthlength <= 50
request_id?string|null
task?|null
tokens_cached?integer|null
tokens_input?integer|null
tokens_output?integer|null
total_ms?integer|null
ttft_ms?integer|null
units?integer|null

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X POST 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage' \  -H 'Content-Type: application/json' \  -d '{  "modality": "string",  "model_slug": "string",  "provider": "string"}'
Example Response
{}

Get Spend

GET
/internal/v1/instances/{instance_id}/usage/spend

Path Parameters

instance_id*Instance Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X GET 'https://example.com/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage/spend'
Example Response
{}