---
title: "Log External Usage"
method: POST
path: "/api/ai/usage"
tags: ["AI"]
---

# Log External Usage

`POST /api/ai/usage`

## Request

- Base URL: `https://api.ruzora.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ruzora.com/api/ai/usage`
- Auth: none declared

Log AI token usage from external services (chat-api, agent-service).

This endpoint is for internal service-to-service use.

## Request body

- UsageLogRequest: Request body for external services to log AI usage.
  - `service` string, required
  - `operation` string, required
  - `model` string, required
  - `input_tokens` integer, required
  - `output_tokens` integer, required
  - `cache_creation_input_tokens` integer
  - `cache_read_input_tokens` integer
  - `session_id` string, nullable
  - `metadata_json` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api.md) · [All operations](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api/revisions/f9b8223f3ac4?raw)
