curl -X POST https://app.selfbench.dev/api/orgs/mupt-ai/repos/mupt-ai/self-bench/batches \
-H "Authorization: Bearer $SELFBENCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"candidateCounts":{"easy":1,"medium":2,"hard":0},"generation":{
"authorModel":"<model-id>","verifierModel":"<model-id>","reasoning":"medium",
"modelAccess":"credential","modelCredentialId":"<uuid>",
"sandbox":"e2b","sandboxCredentialId":"<uuid>",
"harborEnvironment":"e2b","harborCredentialId":"<uuid>"
}}'
Workspace API
Create a Batch
Generate benchmark tasks from merged pull requests.
POST
/
api
/
orgs
/
{org}
/
repos
/
{owner}
/
{name}
/
batches
curl -X POST https://app.selfbench.dev/api/orgs/mupt-ai/repos/mupt-ai/self-bench/batches \
-H "Authorization: Bearer $SELFBENCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"candidateCounts":{"easy":1,"medium":2,"hard":0},"generation":{
"authorModel":"<model-id>","verifierModel":"<model-id>","reasoning":"medium",
"modelAccess":"credential","modelCredentialId":"<uuid>",
"sandbox":"e2b","sandboxCredentialId":"<uuid>",
"harborEnvironment":"e2b","harborCredentialId":"<uuid>"
}}'
string
required
Workspace login.
string
required
GitHub owner.
string
required
Repository name.
string
required
Bearer plus a write API key.object
required
Easy, medium, and hard counts; 1–300 total.
object
Model, reasoning, sandbox, and credential choices. Required when credential storage is configured.
curl -X POST https://app.selfbench.dev/api/orgs/mupt-ai/repos/mupt-ai/self-bench/batches \
-H "Authorization: Bearer $SELFBENCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"candidateCounts":{"easy":1,"medium":2,"hard":0},"generation":{
"authorModel":"<model-id>","verifierModel":"<model-id>","reasoning":"medium",
"modelAccess":"credential","modelCredentialId":"<uuid>",
"sandbox":"e2b","sandboxCredentialId":"<uuid>",
"harborEnvironment":"e2b","harborCredentialId":"<uuid>"
}}'
202 with { "runId": "batch-…", "run": { … } }. Poll GET /api/orgs/{org}/repos/{owner}/{name}/batches/{runId} for progress. Get available choices from GET /api/orgs/{org}/repos/{owner}/{name}/generation-options.