For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Trust CenterStatusSupportGet a demoPlatform
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingGuidesChangelog
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingGuidesChangelog
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
    • Data Models
    • API Conventions
  • Data Models
  • Evals
  • Legacy
        • POSTBatch Create
LogoLogo
Trust CenterStatusSupportGet a demoPlatform
LegacyMetricsBatch Metrics

Batch Create

POST
https://api.confident-ai.com/v1/batch-metrics
POST
/v1/batch-metrics
$curl -X POST https://api.confident-ai.com/v1/batch-metrics \
> -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
> -H "Content-Type: application/json" \
> -d '{
> "metrics": [
> {
> "id": "string",
> "name": "Correctness",
> "requiredParameters": [
> "input"
> ],
> "multiTurn": false,
> "criteria": "Determine if the `actual output` is correct based on the `expected output`.",
> "evaluationParams": [
> "actualOutput",
> "expectedOutput"
> ]
> }
> ]
>}'
200Successful
1{
2 "success": true,
3 "data": {
4 "ids": [
5 "METRIC-ID"
6 ]
7 },
8 "deprecated": true
9}

Deprecated. Use POST /v1/metrics/batch instead. Creates a batch of new metrics on your Confident AI project.

Was this page helpful?
Previous

List Metric Data

Next
Built with

Headers

CONFIDENT_API_KEYstringRequired
The API key of your Confident AI project.

Request

metricslist of objectsRequired
This is the list of metrics you want to add to your project.

Response

successboolean
This is true if the metrics were created successfully.
dataobject
This maps to the ids of the metrics created.
deprecatedboolean
This is true if this batch metrics endpoint is deprecated.