Change a method
const url = 'https://api.pensievelabs.co/v1/methods/fine-tuning';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"markdown":"# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones, in three stages.\n"}'};
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/methods/fine-tuning \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "markdown": "# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones, in three stages.\n" }'Replaces the file and raises its version by one. Experiments already designed keep the version they started with. Built-in methods can’t be changed: add a copy under a new slug.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A post-training method’s slug, such as fine-tuning. See List methods for what your workspace has.
Example
fine-tuningRequest Bodyrequired
Section titled “Request Bodyrequired”object
The whole new file.
Example
{ "markdown": "# Curriculum fine-tuning\n\nFine-tune on easy cases first, then hard ones, in three stages.\n"}Responses
Section titled “Responses”The method, at its new version.
A post-training method, written as a plain markdown file. It starts with a # title and a paragraph
saying what the method does and when to try it; the rest is up to its author. Pensieve’s own files have
Needs, Steps, Settings (what an experiment can change) and Checks. Agents read the file to design
experiments with the method and follow it as written.
object
A post-training method’s slug, such as fine-tuning. See List methods for what your workspace has.
The file’s title.
The file’s first paragraph.
The whole file.
Goes up by one with every change. Each experiment records the version it ran.
Shipped by Pensieve. Built-in methods can’t be changed or removed.
Example
{ "id": "fine-tuning", "object": "method", "name": "Fine-tuning"}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" }}