Benchmarks
5 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
The ready-made benchmarks, with their source and revision#
GET
Responses/v1/benchmarksscope sandboxes:read200401403
curl -s -X GET https://api.kosa8.com/v1/benchmarks \ -H "Authorization: Bearer $KOSA8_API_KEY"
One benchmark#
GET
Parameters/v1/benchmarks/{name}scope sandboxes:readnamerequiredpath · stringBenchmark name, e.g. swe-bench-verified
200401403404
curl -s -X GET https://api.kosa8.com/v1/benchmarks/$NAME \ -H "Authorization: Bearer $KOSA8_API_KEY"
A benchmark's instances, in the dataset's order, with their environments' state#
GET
Parameters/v1/benchmarks/{name}/instancesscope sandboxes:readnamerequiredpath · stringBenchmark name, e.g. swe-bench-verified
statequery · "ready" | "building" | "queued" | "failed" | "not_built"Only instances whose environment is in this state
limitquery · integer—
cursorquery · stringnext_cursor of the page before
200400401403404
curl -s -X GET https://api.kosa8.com/v1/benchmarks/$NAME/instances \ -H "Authorization: Bearer $KOSA8_API_KEY"
One instance: the solver's input and its environment's state and ETA, never the hidden tests#
GET
Parameters/v1/benchmarks/{name}/instances/{id}scope sandboxes:readnamerequiredpath · stringBenchmark name, e.g. swe-bench-verified
idrequiredpath · stringInstance id, e.g. django__django-11099
200401403404
curl -s -X GET https://api.kosa8.com/v1/benchmarks/$NAME/instances/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Build environments ahead of use (at most 100 a call)#
POST
/v1/benchmarks/{name}/preparescope sandboxes:writeA create of an instance whose environment is not ready answers 409 template_building with eta_s and Retry-After; this builds them first instead. Building is kosa8's cost.
Parametersnamerequiredpath · stringBenchmark name, e.g. swe-bench-verified
instancesrequiredarray of string | "all" | integerInstance ids, "all", or n: a seeded sample of n
seedintegerMin 0.
202400401402403404
curl -s -X POST https://api.kosa8.com/v1/benchmarks/$NAME/prepare \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json