Skip to Content
Eval suites

Generate eval scenarios

Permissioneval-suites:updateAdd-onEvaluationsRetriesIdempotency-Key requiredAuthentication
POST
/eval-suites/{id}/generate

Creates an asynchronous generation job for 1 to 5000 scenarios and publishes it to the queue. The complete encoded request body is limited to 65536 bytes. Poll Location after Retry-After. context_text is optional and limited to 20000 encoded bytes.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

application/json
  1. body
agent_id*string
Formatuuid
count*integer
Range1 <= value <= 5000
context_text?string

Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint.

Lengthlength <= 20000
Default""

Response Body

Generation job accepted.

application/json
  1. response
job_id*string
Formatuuid
requested_count*integer
Range1 <= value <= 5000
Example Request
curl -X POST 'https://api.kejue.co/v1/eval-suites/497f6eca-6276-4993-bfeb-53cbbbba6f08/generate' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",  "count": 1}'
Example Response
{  "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",  "requested_count": 1}