Session Templates
Session templates define reusable configurations for sessions, including which providers to include. Templates can be used to quickly create new sessions with consistent settings.
Session Templates object
Attributes
object
StringString representing the object's type
id
StringUnique session template identifier
name
StringTemplate name
description
StringNullableTemplate description
metadata
ObjectNullableCustom key-value pairs
created_at
DateTimestamp when created
updated_at
DateTimestamp when last updated
{"object": "session.template","id": "stm_2bCdEfGhJkLmNpQr","name": "Production Template","description": "Template for production sessions","metadata": {"environment": "production"},"created_at": "2025-09-15T10:30:00.000Z","updated_at": "2026-01-10T14:45:00.000Z"}
List session templates
Returns a paginated list of session templates.
Query Parameters
limit
NumberOptionalMaximum number of items to return (1-100)
after
StringOptionalReturn items after this ID
before
StringOptionalReturn items before this ID
cursor
StringOptionalPagination cursor from a previous response
order
EnumOptionalSort order for results
curl -X GET "https://api.metorial.com/session-templates" \-H "Authorization: Bearer metorial_sk_..."
Get session template
Retrieves a specific session template by ID.
URL Parameters
session_template_id
StringThe unique identifier for the session_template
curl -X GET "https://api.metorial.com/session-templates/ses_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
Create session template
Creates a new session template.
Request Body
name
Stringdescription
StringOptionalmetadata
ObjectOptionalCustom key-value pairs for storing additional information
providers
ObjectOptionalOptional list of providers to include in the template
curl -X POST "https://api.metorial.com/session-templates" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"name": "example_name","description": "example_description","metadata": {},"providers": {"provider_deployment": {"type": "example_type","provider_deployment_id": "example_provider_deployment_id"},"provider_config": {"type": "example_type","provider_config_id": "example_provider_config_id"},"provider_auth_config": {"type": "example_type","provider_auth_config_id": "example_provider_auth_config_id"},"tool_filters": {"tool_keys": ["example_item"]}}}'
Update session template
Updates a specific session template.
URL Parameters
session_template_id
StringThe unique identifier for the session_template
Request Body
name
StringOptionaldescription
StringOptionalmetadata
ObjectOptionalCustom key-value pairs for storing additional information
curl -X PATCH "https://api.metorial.com/session-templates/ses_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"name": "example_name","description": "example_description","metadata": {}}'