---
title: "Generate metrics"
method: POST
path: "/test_framework/v3/metrics/generate_metrics/"
tags: ["test_framework"]
---

# Generate metrics

`POST /test_framework/v3/metrics/generate_metrics/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/test_framework/v3/metrics/generate_metrics/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Suggest metrics for an agent and return them. The metrics are not saved; pass them to Create Metrics in Bulk to keep them. The agent needs a description of at least 100 characters. Usually takes under a minute.

## Request body

- SchemaGenerateMetricsMetricCreate
  - `agent_id` integer: The ID of the AI agent to generate metrics for. Either agent_id or assistant_id must be provided.
  - `assistant_id` string: The assistant ID to generate metrics for. Either agent_id or assistant_id must be provided.
  - `num_metrics` integer: Number of metrics to generate

## Response `200`

- object
  - `status` 'completed' | 'failed': `failed` when the job could not produce its result; see `error` / `errors`.
  - `agent_id` integer
  - `current_step` string
  - `metrics` object[]: Suggested metrics. They are not saved; pass them to Create Metrics in Bulk.
  - `error` string, nullable: Why the job failed, when it did.

## Other responses

- `400`
- `403`: No access to the agent, project, metric or result the job runs on.
- `504`: The job did not finish within 15 minutes. It may still complete in the background.

## Changes

- **2026-11-03** `a6fb6a739212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/test_framework/v3/metrics/generate_metrics/post.md)

---

[API](https://skmtc.dev/cekura/apis/cekura-api.md) - [All operations](https://skmtc.dev/cekura/apis/cekura-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cekura/apis/cekura-api/revisions/a6fb6a739212?raw)
