import weflayr
from weflayr.openapi.models import StartOrResumeBenchmarkInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.start_or_resume_benchmark(body=StartOrResumeBenchmarkInput.from_dict({
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"accepted_estimated_cost": 3.4,
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.startOrResumeBenchmark({
client,
throwOnError: true,
body: {
benchmarkUuid: '5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01',
acceptedEstimatedCost: 3.4,
},
});
curl -X POST https://app.weflayr.com/api/benchmark-start/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"accepted_estimated_cost": 3.4
}'
{
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"url": "https://app.weflayr.com/dashboard/optimization/benchmark/?benchmark=5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"name": "Summarize profile",
"status": "running",
"message": "Running: the benchmark takes a while. An email tells its creator when it is done.",
"call_names": [
"summarize_profile"
],
"optimization_objectives": [
"same_quality_lowest_cost",
"same_cost_best_quality"
],
"period": {
"date_from": "2026-09-24",
"date_to": "2026-10-23"
},
"requested_at": "2026-10-23T09:10:00+00:00",
"started_at": "2026-10-23T09:10:30+00:00",
"completed_at": null,
"updated_at": "2026-10-23T09:00:00+00:00",
"estimated_cost": 3.4,
"actual_cost": 0.8,
"credit_reserved": 4.08,
"setup": {
"deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL"
}
],
"forced_deployments": [],
"evaluators_impacting_benchmark": [
1
],
"evaluators_for_reference": [
14
],
"config": {
"optimization_objectives": [
"same_quality_lowest_cost",
"same_cost_best_quality"
],
"period": {
"date_from": "2026-09-24",
"date_to": "2026-10-23"
},
"examples": 300,
"validation_examples": 50,
"replays": 1,
"sampling": "smart",
"baseline_deployment": null,
"production_model_replay_deployment": null,
"model_prices_prompted_by_user": [],
"mask_pii": false,
"auto_disallow_too_costly_reasoning_efforts": true,
"ignore_max_tokens": true
}
},
"baseline": null,
"recommendations": [],
"overpriced_reasoning_efforts": [],
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "A completed benchmark cannot become running. Read its status with get_benchmark.", "code": "invalid_benchmark_action"}
{"error": "Not enough credit: $12.40 needed, $3.10 available. Top up on the Credits page, then call start_or_resume_benchmark again.", "code": "insufficient_credits"}
{"error": "No benchmark of this project has the id 5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01. List the project's benchmarks with get_benchmarks."}
{"error": "The benchmark is estimated at 3.80 USD, more than the 3.40 USD you accepted. Read the benchmark with get_benchmark, then pass estimate.estimated_cost for a draft, or estimated_cost for a stopped benchmark, as accepted_estimated_cost.", "code": "estimated_cost_above_accepted_cost"}
{"error": "Invalid request payload.", "detail": [{"field": "accepted_estimated_cost", "error": "Field required"}]}
Benchmarks
Start or resume benchmark
Start a saved benchmark setup or resume a stopped benchmark.
POST
/
api
/
benchmark-start
/
import weflayr
from weflayr.openapi.models import StartOrResumeBenchmarkInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.start_or_resume_benchmark(body=StartOrResumeBenchmarkInput.from_dict({
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"accepted_estimated_cost": 3.4,
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.startOrResumeBenchmark({
client,
throwOnError: true,
body: {
benchmarkUuid: '5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01',
acceptedEstimatedCost: 3.4,
},
});
curl -X POST https://app.weflayr.com/api/benchmark-start/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"accepted_estimated_cost": 3.4
}'
{
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"url": "https://app.weflayr.com/dashboard/optimization/benchmark/?benchmark=5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"name": "Summarize profile",
"status": "running",
"message": "Running: the benchmark takes a while. An email tells its creator when it is done.",
"call_names": [
"summarize_profile"
],
"optimization_objectives": [
"same_quality_lowest_cost",
"same_cost_best_quality"
],
"period": {
"date_from": "2026-09-24",
"date_to": "2026-10-23"
},
"requested_at": "2026-10-23T09:10:00+00:00",
"started_at": "2026-10-23T09:10:30+00:00",
"completed_at": null,
"updated_at": "2026-10-23T09:00:00+00:00",
"estimated_cost": 3.4,
"actual_cost": 0.8,
"credit_reserved": 4.08,
"setup": {
"deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL"
}
],
"forced_deployments": [],
"evaluators_impacting_benchmark": [
1
],
"evaluators_for_reference": [
14
],
"config": {
"optimization_objectives": [
"same_quality_lowest_cost",
"same_cost_best_quality"
],
"period": {
"date_from": "2026-09-24",
"date_to": "2026-10-23"
},
"examples": 300,
"validation_examples": 50,
"replays": 1,
"sampling": "smart",
"baseline_deployment": null,
"production_model_replay_deployment": null,
"model_prices_prompted_by_user": [],
"mask_pii": false,
"auto_disallow_too_costly_reasoning_efforts": true,
"ignore_max_tokens": true
}
},
"baseline": null,
"recommendations": [],
"overpriced_reasoning_efforts": [],
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "A completed benchmark cannot become running. Read its status with get_benchmark.", "code": "invalid_benchmark_action"}
{"error": "Not enough credit: $12.40 needed, $3.10 available. Top up on the Credits page, then call start_or_resume_benchmark again.", "code": "insufficient_credits"}
{"error": "No benchmark of this project has the id 5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01. List the project's benchmarks with get_benchmarks."}
{"error": "The benchmark is estimated at 3.80 USD, more than the 3.40 USD you accepted. Read the benchmark with get_benchmark, then pass estimate.estimated_cost for a draft, or estimated_cost for a stopped benchmark, as accepted_estimated_cost.", "code": "estimated_cost_above_accepted_cost"}
{"error": "Invalid request payload.", "detail": [{"field": "accepted_estimated_cost", "error": "Field required"}]}
Start a saved setup or resume a stopped benchmark. It needs the estimated cost you accept: it is refused when the benchmark costs more, and when your available credit (your balance minus what other running benchmarks reserve) is below the estimate plus 30%, the amount it reserves. A started benchmark runs in the background: follow it with get_benchmark.
The response also carries
Spends credit: ask the person to accept the estimated cost before calling it.
Parameters
Passed in the request body.string
required
The benchmark’s id.
number
required
The estimated cost in USD you accept, as the estimate of get_benchmark gives it. The benchmark is refused when it now costs more.
boolean
default:"false"
Resume without the overpriced_reasoning_efforts of get_benchmark: the run no longer replays them, and the credit reserved covers what finishing costs without them. Only for resuming a stopped benchmark that has some.
blockers (what prevents the usual next step), in plain words. It is empty when the usual workflow applies.
import weflayr
from weflayr.openapi.models import StartOrResumeBenchmarkInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.start_or_resume_benchmark(body=StartOrResumeBenchmarkInput.from_dict({
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"accepted_estimated_cost": 3.4,
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.startOrResumeBenchmark({
client,
throwOnError: true,
body: {
benchmarkUuid: '5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01',
acceptedEstimatedCost: 3.4,
},
});
curl -X POST https://app.weflayr.com/api/benchmark-start/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"accepted_estimated_cost": 3.4
}'
{
"benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"url": "https://app.weflayr.com/dashboard/optimization/benchmark/?benchmark=5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
"name": "Summarize profile",
"status": "running",
"message": "Running: the benchmark takes a while. An email tells its creator when it is done.",
"call_names": [
"summarize_profile"
],
"optimization_objectives": [
"same_quality_lowest_cost",
"same_cost_best_quality"
],
"period": {
"date_from": "2026-09-24",
"date_to": "2026-10-23"
},
"requested_at": "2026-10-23T09:10:00+00:00",
"started_at": "2026-10-23T09:10:30+00:00",
"completed_at": null,
"updated_at": "2026-10-23T09:00:00+00:00",
"estimated_cost": 3.4,
"actual_cost": 0.8,
"credit_reserved": 4.08,
"setup": {
"deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL"
}
],
"forced_deployments": [],
"evaluators_impacting_benchmark": [
1
],
"evaluators_for_reference": [
14
],
"config": {
"optimization_objectives": [
"same_quality_lowest_cost",
"same_cost_best_quality"
],
"period": {
"date_from": "2026-09-24",
"date_to": "2026-10-23"
},
"examples": 300,
"validation_examples": 50,
"replays": 1,
"sampling": "smart",
"baseline_deployment": null,
"production_model_replay_deployment": null,
"model_prices_prompted_by_user": [],
"mask_pii": false,
"auto_disallow_too_costly_reasoning_efforts": true,
"ignore_max_tokens": true
}
},
"baseline": null,
"recommendations": [],
"overpriced_reasoning_efforts": [],
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "A completed benchmark cannot become running. Read its status with get_benchmark.", "code": "invalid_benchmark_action"}
{"error": "Not enough credit: $12.40 needed, $3.10 available. Top up on the Credits page, then call start_or_resume_benchmark again.", "code": "insufficient_credits"}
{"error": "No benchmark of this project has the id 5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01. List the project's benchmarks with get_benchmarks."}
{"error": "The benchmark is estimated at 3.80 USD, more than the 3.40 USD you accepted. Read the benchmark with get_benchmark, then pass estimate.estimated_cost for a draft, or estimated_cost for a stopped benchmark, as accepted_estimated_cost.", "code": "estimated_cost_above_accepted_cost"}
{"error": "Invalid request payload.", "detail": [{"field": "accepted_estimated_cost", "error": "Field required"}]}