Run test cases from a JSON spec file
Changed onRun agent test cases straight from a JSON spec, without creating evaluators. Keep the spec in your repository and post it from CI.
The spec describes only what to test. Pick the target with agent_id and channel on the request — voice for a phone call (default), text for chat, elevenlabs, livekit_v2, or pipecat_v2 for the matching WebRTC connection, or chirp for a raw-PCM WebSocket endpoint — so one file runs unchanged against any agent or environment. LiveKit, Pipecat and CHIRP connection overrides belong in the request's livekit_data, pipecat_data or chirp_data (websocket_url), never in the spec.
Run overrides: the request accepts the same run-level overrides as scenarios_run_voice, applied to every test case in the spec — frequency (multiplies each case's own frequency), agent_number and outbound_phone_number (voice and text; on voice, outbound_phone_number is for inbound agents only), mode (inbound voice agents), concurrency_limit (overrides the spec's defaults.concurrency_limit) and mock_tool_names. Personalities, test profiles and the Cekura-side phone_number are set per test case in the spec.
Pass dry_run=true to validate only: the response describes the run that would happen (test cases, total runs, estimated cost) and nothing is created or charged. Use that on every commit, and the real call on the branches you want tested.
Every problem in a spec is reported at once, keyed by its location in the file (for example scenarios[3].metrics[1]). Metrics must already exist and be enabled for the target agent; personalities and test profiles can be referenced by ID or defined inline.
Fetch the schema this endpoint accepts from scenarios_json_schema.
Cost: voice- or text-simulation rate per run. Test cases from a spec are removed automatically once no run needs them.
Request
- Base URLhttps://api.cekura.ai
- URLhttps://api.cekura.ai/test_framework/v2/scenarios/run_scenarios_json/
- Auth
- API key in header X-CEKURA-API-KEY
- or HTTP bearer
- or HTTP bearer
Query parameters
Validate and price the spec without running or charging anything.
Request body
Response
Example response
{
"runs": [
{
"number": "+11234567890",
"inbound_number": "+11234567890"
}
],
"created_at": "2025-02-25T21:00:01.990052Z"
}Changes
- info
endpoint added
- info