Skip to main content
POST
/
create-batch-test
JavaScript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

const batchTestResponse = await client.tests.createBatchTest({
  response_engine: { llm_id: 'llm_id', type: 'retell-llm' },
  test_case_definition_ids: ['string'],
});

console.log(batchTestResponse.test_case_batch_job_id);
{
  "test_case_batch_job_id": "<string>",
  "status": "in_progress",
  "response_engine": {
    "type": "retell-llm",
    "llm_id": "<string>",
    "version": 0
  },
  "pass_count": 1,
  "fail_count": 1,
  "error_count": 1,
  "total_count": 1,
  "creation_timestamp": 123,
  "user_modified_timestamp": 123
}

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Body

application/json
test_case_definition_ids
string[]
required

Array of test case definition IDs to run

Required array length: 1 - 200 elements
response_engine
object
required

Response engine to use for the test cases. Custom LLM is not supported.

  • Option 1
  • Option 2

Response

Test case batch job created successfully

test_case_batch_job_id
string
required

Unique identifier for the test case batch job

status
enum<string>
required

Status of the batch job

Available options:
in_progress,
complete
response_engine
object
required
  • Option 1
  • Option 2
  • Option 3
pass_count
integer
required

Number of test cases that passed

Required range: x >= 0
fail_count
integer
required

Number of test cases that failed

Required range: x >= 0
error_count
integer
required

Number of test cases that encountered errors

Required range: x >= 0
total_count
integer
required

Total number of test cases in the batch

Required range: x >= 0
creation_timestamp
integer
required

Timestamp when the batch job was created (milliseconds since epoch)

user_modified_timestamp
integer
required

Timestamp when the batch job was last modified (milliseconds since epoch)