Skip to main content

Delete a prompt fragment

POST 

/api/v1/prompt-fragments/delete

Deletes a fragment from the current set. The renderer reports missing fragments and other reachable-template errors; its caller can then return the original prompt.

Deleting does not rewrite the profiles that include it

A missing fragment can leave the system prompt unrendered, so literal {{template "safety" .}} text reaches the model. Generation may continue with that raw template; this is not a validated or safe fallback, and a successful response does not prove that the intended instructions were rendered. Other failures can still stop the turn.

Check dependencies before removal: page through all profiles and inspect their generationConfig.systemPrompt values, then check nested fragment includes too. Checking one page or only direct includes can miss a dependent profile.

Request​

Responses​

Fragment deleted

Document ID: DOC-MA-profiles-prompts-api-deletePromptFragment. Section identities and revisions.

SectionStable reference
OverviewDOC-MA-profiles-prompts-api-deletePromptFragment#overview
RequestDOC-MA-profiles-prompts-api-deletePromptFragment#request
ResponsesDOC-MA-profiles-prompts-api-deletePromptFragment#responses