---
title: "Log scalar training metrics on a TrainingSession (append-only time-series, upserts on (session, key, step) so retries are idempotent)."
method: POST
path: "/v1/accounts/{account_id}/trainingSessions/{training_session_id}:logMetrics"
tags: ["gateway.openapi_Gateway"]
---

# Log scalar training metrics on a TrainingSession (append-only time-series, upserts on (session, key, step) so retries are idempotent).

`POST /v1/accounts/{account_id}/trainingSessions/{training_session_id}:logMetrics`

## Request

- Base URL: `https://api.fireworks.ai`
- URL: `https://api.fireworks.ai/v1/accounts/{account_id}/trainingSessions/{training_session_id}:logMetrics`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/docs/v1/accounts/:account_id/trainingSessions/:training_session_id:logMetrics/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `account_id` string, required
- `training_session_id` string, required

## Request body

- GatewayGatewayLogTrainingSessionMetricsBody
  - `points` GatewayMetricPoint[], required: Batch of metric observations. Server caps the per-request batch size to bound upsert statement parameter count.
    - `key` string: Metric identifier (e.g. "reward", "loss", "accuracy"). Required.
    - `value` number, double: Observed scalar value at this step.
    - `step` string, int64: Training step the observation was made at. Monotonic per (session, key).
    - `timestamp` string, date-time: Optional client-supplied wall-clock timestamp. Defaults to server time.

## Response `200`

A successful response.

- GatewayLogTrainingSessionMetricsResponse

## Changes

- **2026-10-16** `3bf245180173`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/changes/v1/accounts/:account_id/trainingSessions/:training_session_id:logMetrics/post.md)

---

[API](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api.md) - [All operations](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fw-ai-external/apis/gateway-rest-api/revisions/3bf245180173?raw)
