Skip to content

Reference

lg_presets_create: Save a preset

Markdown version

Create a preset: a model, provider routing, a system prompt and parameters under a name. The organization's guardrails still apply.

  • Changes data: yes
  • Credential scope: gateway:write (an API key's scopes, or what you allowed when connecting with OAuth)
  • Assistant level: an assistant at Full; a lower level is refused

Inputs

FieldTypeRequiredNotes
bodyobject (name, model, models, provider, routing, system_prompt, params)yes
body.namestringyes
body.modelstring or nullno
body.modelsarray of string or nullno
body.providerobject or nullno
body.routingobject (provider)noSame as provider (the console's form)
body.routing.providerobjectyes
body.system_promptstring or nullno
body.paramsobject (temperature, top_p, max_tokens, reasoning_effort, response_format) or nullno

Example MCP call

A tools/call request to https://manage.restolayer.com/mcp:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_presets_create",
    "arguments": {
      "body": {
        "name": "support-bot",
        "model": "anthropic/claude-sonnet-5-5",
        "system_prompt": "You answer support questions."
      }
    }
  }
}

Example REST call

The same thing over REST (POST /v1/presets):

curl -s -X POST "https://manage.restolayer.com/v1/presets" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"support-bot","model":"anthropic/claude-sonnet-5-5","system_prompt":"You answer support questions."}'

All tools: MCP tools. Connecting: connect your assistant.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.