Palbase ai · API
PUT
/ai/templates/{name}Create or save a new draft version of an AI template
Create or save a new draft version of an AI template.
Called by your server, with the project's secret key.
Path
namestring · requiredTemplate slug name.Request body
modality"text" | "image" | "video" | "stt" | "tts" | "voice_live" · optionalTemplate modality (defaults to text).modelstring · requiredCatalog model identifier.fallback_modelsstring[] · optionalOrdered fallback catalog models.system_instructionsstring · optionalSystem instructions locked on the server.prompt_templatestring · optionalPrompt template with {{variable}} placeholders.variables_schemaobject · optionalJSON Schema for allowed client variables.response_schemaobject · optionalOptional structured JSON output schema.generation_limitsobject · optionalServer-locked input/output limits enforced on every template invocation.client_policyobject · optionalAuthentication, device attestation, and per-user budget guardrails for a template.publishboolean · optionalPublish this version immediately after saving.curl
curl -X PUT "https://<your-ref>.palbase.studio/ai/templates/<name>" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"model":"string"}'Responses
200Saved template
400HTTP 400 error
401HTTP 401 error
403HTTP 403 error
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation PutTemplate of ai's contract.