Modaic sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.modaic.dev/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

Search Modaic documentation

Find a Modaic guide or API reference

Reference›API›Models

Update model

Update model metadata or commit a new model.json configuration. Repository write access is required.

PATCH/v1/models/{workspace}/{model}

Authorization

Authorizationstringrequired

Send a Modaic bearer token in the Authorization header.

Path Parameters

workspacestringrequired

User or organization slug.

modelstringrequired

Model repository slug.

Query Parameters

branchstring

Branch to update. Defaults to the model's default branch.

Body

descriptionstring | null

Replace or clear the repository description. Requires repository admin access.

confidenceThresholdnumber

Annotation review threshold from 0 to 1. Requires repository admin access. This is model metadata and does not create a configuration commit.

modelstring

Root model used for decisions.

questionsRecord<string, Question>

Replace the model's typed questions. Question shapes match POST /v1/systemone.

messagestring

Commit message, up to 500 characters, for a configuration change.

expectedHeadShastring

Optimistic concurrency. The branch head you last read: commit.commitSha from Get model or a previous update. If the branch has since advanced, the update is refused with 409 expected_head_mismatch and details.currentHeadSha, so a stale client cannot overwrite newer commits. Applies to updates that carry model or questions; a description or confidence threshold update is metadata, not a commit, and is not checked. Omitted, the update is permissive.

discardAlignmentboolean

Required to replace questions that instruction optimization wrote. Once a model has an optimized checkpoint, questions that differ from the stored ones are refused with 409 alignment_would_be_discarded unless this is true.

At least one of description, confidenceThreshold, model, or questions is required; an empty update returns 422 model_update_empty. Updating model or questions resets the checkpoint to 0 and clears prior evaluation metrics, while preserving the confidence threshold and capture policy.

Instruction optimization writes its optimized instructions into the same questions field. A setup script that re-pushes the schema as authored would therefore revert an optimized model to checkpoint 0. To prevent that, once the model has a checkpoint this endpoint refuses questions that differ from the stored ones with 409 alignment_would_be_discarded; its details carry the branch, commitSha, and checkpoint. Omit questions to keep the optimized instructions, or send discardAlignment: true to replace them deliberately. Read the stored configuration first if you want to compare.

Response

idUUIDrequired
workspaceEntityrequired
slugstringrequired
descriptionstring | nullrequired
confidenceThresholdnumberrequired
defaultBranchstringrequired
visibilityprivaterequired
createdAtISO 8601 datetimerequired
updatedAtISO 8601 datetimerequired
configurationModelConfiguration

The current schemaVersion, root model, checkpoint, questions, and any saved metrics or capture policy.

commitobject

Present when model or questions was supplied. Includes commitSha, branch, and previousSha. For a no-op, commitSha equals previousSha and both are the current head.

unchangedboolean

true when the supplied model and questions already match the stored configuration. Nothing is committed, the checkpoint and metrics are left as they are, and configuration is the stored one. Aliases and key order are ignored in the comparison.

A missing model or branch returns 404. The endpoint returns 409 expected_head_mismatch when the branch is not at expectedHeadSha, 409 when the branch advances while the update is being committed, and 409 alignment_would_be_discarded when questions would overwrite an optimization checkpoint without discardAlignment: true. An overwritten version can be restored with Roll back a branch.

Was this page helpful?