v2

latestOpenAPI 3.0.02026-08-051996591.2 MB
Generation Presets

Create a generation preset

Creates a custom generation preset for use in query and chat requests. A generation preset bundles a prompt template, an LLM, and model parameters into a reusable configuration.

Reference the created preset by name with the generation_preset_name field in query or chat requests.

post/v2/generation_presets

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Request body

idstring

The ID of the generation preset.

namestring required

The name of the generation preset. Use this name to configure generation.

descriptionstring

Description of the generation preset.

llm_namestring

The name of the model that this preset is used with. The GET /v2/llms endpoint lists the available names.

prompt_templatestring

The preset template that renders the prompt sent to generation.

max_used_search_resultsinteger

The preset maximum number of search results available to the prompt.

max_tokensinteger

The preset maximum number of tokens that generation returns.

temperaturenumber float

The sampling temperature to use. Higher values make the output more random, while lower values make it more focused and deterministic.

frequency_penaltynumber float

Higher values penalize new tokens based on their existing frequency in the generation so far, decreasing the model's likelihood to repeat the same line verbatim.

presence_penaltynumber float

Higher values penalize new tokens based on whether they appear in the generation so far, increasing the model's likelihood to talk about new topics.

additional_model_paramsobject

Additional model parameters beyond the standard fields above.

enabledboolean

Indicates whether the generation preset is enabled.

defaultboolean

Indicates whether this is the default generation preset for the LLM.

ownership'platform' | 'customer'

Indicates whether the generation preset is provided by the platform or created by the customer. Platform presets are pre-configured and cannot be modified or deleted. Customer presets are created and managed by the customer.

Example request

{
  "id": "gnp_123",
  "name": "Mockingbird 2.0",
  "description": "Mockingbird LLM 2.0 prompt for summarizing query results as an answer. Designed for RAG.",
  "llm_name": "mockingbird-2.0",
  "max_used_search_results": 50,
  "max_tokens": 500,
  "temperature": 0.4,
  "frequency_penalty": 0.2,
  "presence_penalty": 0.2,
  "ownership": "platform"
}

Response

The created generation preset.

idstring

The ID of the generation preset.

namestring required

The name of the generation preset. Use this name to configure generation.

descriptionstring

Description of the generation preset.

llm_namestring

The name of the model that this preset is used with. The GET /v2/llms endpoint lists the available names.

prompt_templatestring

The preset template that renders the prompt sent to generation.

max_used_search_resultsinteger

The preset maximum number of search results available to the prompt.

max_tokensinteger

The preset maximum number of tokens that generation returns.

temperaturenumber float

The sampling temperature to use. Higher values make the output more random, while lower values make it more focused and deterministic.

frequency_penaltynumber float

Higher values penalize new tokens based on their existing frequency in the generation so far, decreasing the model's likelihood to repeat the same line verbatim.

presence_penaltynumber float

Higher values penalize new tokens based on whether they appear in the generation so far, increasing the model's likelihood to talk about new topics.

additional_model_paramsobject

Additional model parameters beyond the standard fields above.

enabledboolean

Indicates whether the generation preset is enabled.

defaultboolean

Indicates whether this is the default generation preset for the LLM.

ownership'platform' | 'customer'

Indicates whether the generation preset is provided by the platform or created by the customer. Platform presets are pre-configured and cannot be modified or deleted. Customer presets are created and managed by the customer.

Example response

{
  "id": "gnp_123",
  "name": "Mockingbird 2.0",
  "description": "Mockingbird LLM 2.0 prompt for summarizing query results as an answer. Designed for RAG.",
  "llm_name": "mockingbird-2.0",
  "max_used_search_results": 50,
  "max_tokens": 500,
  "temperature": 0.4,
  "frequency_penalty": 0.2,
  "presence_penalty": 0.2,
  "ownership": "platform"
}