Search Modaic documentation

Find a Modaic guide or API reference

Reference›API›Protégé

Start Protégé

Start Protégé with a task prompt and an existing model repository. Protégé uses the datasets and artifacts already linked to that repository.

POST/v1/protege

Authorization

Authorizationstringrequired

Send a Modaic bearer token in the Authorization header.

Body

promptstringrequired

The work Protégé should perform. The trimmed prompt must contain between 1 and 100,000 characters.

repostringrequired

Existing repository in workspace/model form. The caller needs writer access.

eval_only_datasetstring

Name of an eval-only-dataset in the repository owner's workspace. Protégé may use it for held-out evaluation but not training.

import os
import requests

response = requests.post(
    "https://modaic.dev/api/v1/protege",
    headers={"Authorization": f"Bearer {os.environ['MODAIC_API_KEY']}"},
    json={
        "prompt": "Improve this model using its linked resources.",
        "repo": "acme/support-priority",
        "eval_only_dataset": "support-heldout-v2",
    },
)
response.raise_for_status()
job = response.json()
idstring
Protégé job ID.
statusrunning
Initial job state.

The response is 202 Accepted. Poll GET /v1/protege/{jobId} until the job reaches a terminal state.

Was this page helpful?