On this page
test_runs.estimate
Estimate a test run's trials, cost and duration before starting it
Request
POST /api/v1/test-runs/estimate
- MCP:
test_runs_estimate - SDK:
client.test_runs.estimate(SDK path arguments usepath; MCP usesparams). - Minimum API key role: viewer.
- Idempotency: none.
Use the request schema below. Read IDs from earlier operation results.
Input schema
json
{
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestRunCreateRequest"
}
}
}
}
}
Responses
json
{
"200": {
"description": "Estimate a test run's trials, cost and duration before starting it",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestRunsEstimateResponse200"
}
}
}
},
"4XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
Referenced schemas
json
{
"components": {
"schemas": {
"TestRunCreateRequest": {
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"suite_ids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"minItems": 1,
"maxItems": 10
},
"case_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9][a-z0-9_-]*$"
},
"minItems": 1,
"maxItems": 100
},
"trials": {
"type": "integer",
"minimum": 1,
"maximum": 10
},
"baseline_test_run_id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"agent_id",
"version",
"suite_ids"
],
"additionalProperties": false
},
"TestRunsEstimateResponse200": {
"type": "object",
"properties": {
"trials": {
"type": "integer",
"minimum": 0
},
"est_cost_usd": {
"type": "number",
"minimum": 0
},
"est_minutes": {
"type": "number",
"minimum": 0
}
},
"required": [
"trials",
"est_cost_usd",
"est_minutes"
],
"additionalProperties": false
},
"ApiError": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthenticated",
"forbidden",
"not_found",
"conflict",
"invalid_request",
"idempotency_conflict",
"policy_denied",
"capability_unavailable",
"provider_unavailable",
"knowledge_unavailable",
"publication_invalid",
"run_not_active",
"rate_limited",
"outcome_unknown",
"internal"
]
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"outcome": {
"type": "string",
"enum": [
"none",
"unknown"
]
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"code",
"message",
"retryable",
"outcome"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
Errors and recovery
See API error handling and Troubleshooting.
Related guides
Content version 5b63dac4Markdown source