---
title: "Log LLM cost entry (internal, server-to-server)"
method: POST
path: "/v1/internal/llm-cost"
---

# Log LLM cost entry (internal, server-to-server)

`POST /v1/internal/llm-cost`

## Request

- Base URL: `https://api.clichefactory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.clichefactory.com/v1/internal/llm-cost`
- Auth: none declared

## Headers

- `X-API-KEY` string, nullable

## Request body

- LlmCostLogRequest
  - `tenant_id` string, required
  - `job_id` string, nullable
  - `operation` string, required
  - `provider` string, required
  - `model_name` string, nullable
  - `prompt_tokens` integer
  - `completion_tokens` integer
  - `total_tokens` integer
  - `dspy_cost_usd` number, nullable
  - `dspy_metric_calls` integer, nullable
  - `raw_usage_json` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/clichefactory/apis/aio-server.md) · [All operations](https://skmtc.dev/clichefactory/apis/aio-server/llms.txt) · [OpenAPI document](https://skmtc.dev/clichefactory/apis/aio-server/revisions/9bd59f9bbb31?raw)
