Prerequisites
- An API key. AICME issues your lab’s key when you join.
- The base URL for all requests:
https://api.aicmelabs.com - A task your lab is granted, and its version, such as
aicme/example-001andtv_3f9a1c07b2e45d18.
Authorization header, as a bearer token. See
Authentication for details.
Get a reward
Scoring is asynchronous: you send an answer, then poll for the reward until it’s ready. 1. Download the task CallGET /v1/tasks/{task_id}/versions/{version}/package. You get the task as a Harbor package, to run with your
agent. See Tasks and packages for what’s inside.
2. Send an answer
Call POST /v1/rewards with the task, the version you ran, and your agent’s final answer. You get back a reward id.
Inside Harbor, the package’s verifier makes this call for you.
3. Poll for the reward
Call GET /v1/rewards/{id} while status is pending, at least 5 seconds apart. It ends as scored or failed.
4. Read the reward
Once status is scored, read scores.reward, a number between 0 and 1. See Rewards for the other
scores and the flags.
Full example
Next steps
Rewards
The four scores, the flags, and a failed reward.
Tasks and packages
What’s in a package, and how to run it with Harbor.
Errors
Every code, and which to retry.
Limits
How long an answer can be, and how long to wait.