Rename a model, pause its experiments, or set its budget
const url = 'https://api.pensievelabs.co/v1/models/grade-audit';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"experimenting":true,"monthly_budget_usd":2000}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.pensievelabs.co/v1/models/grade-audit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "experimenting": true, "monthly_budget_usd": 2000 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The model’s slug, such as grade-audit, or its mdl_ id.
Example
grade-auditRequest Bodyrequired
Section titled “Request Bodyrequired”object
False pauses the agents: running experiments stop after their current runs, and no new ones start.
Example
{ "experimenting": true, "monthly_budget_usd": 2000}Responses
Section titled “Responses”The model.
object
The decision the model makes, in one sentence.
building: no version beats the frontier yet. shadow: a version runs beside live traffic. live: a
version takes traffic. paused: taken off traffic in the app, so your code answers every call until
it is resumed. archived: retired in the app; it answers no calls, and lists leave it out unless you
ask for status=archived.
object
What your code receives.
The outcomes you send back for its calls.
JSON Schema for input, when the model takes structured cases.
The live version (or best candidate) against the best frontier model, on your test.
object
The lead in points out of 100; negative when behind.
The best frontier model at the last re-test.
object
Under this confidence a call falls back.
Whether Pensieve’s agents are running experiments on it. Pause and resume them with models.update.
Compute for experiments this month. Serving is not counted here.
object
The cap; null for none.
Example
{ "id": "mdl_7f3a91c2", "object": "model", "slug": "grade-audit", "name": "Grade audit", "status": "building", "live_version": "v7", "answers": [ { "value": "false_pass", "label": "False pass" } ], "metric": "Right verdict on the grade", "routing": { "object": "routing", "mode": "observe" }, "owner": "Environments team"}default
Section titled “default”Something went wrong; error.type says what.
object
object
The request field the error is about.
Example
{ "error": { "type": "invalid_request" }}