> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Request parameters for using a server prompt template with [\`TemplateGenerativeModel.generateContent()\`](https://firebase.google.com/docs/reference/js/ai.templategenerativemodel#templategenerativemodelgeneratecontent) and [\`TemplateGenerativeModel.generateContentStream()\`](https://firebase.google.com/docs/reference/js/ai.templategenerativemodel#templategenerativemodelgeneratecontentstream).

**Signature:**

    export interface TemplateRequest 

## Properties

| Property | Type | Description |
|---|---|---|
| [templateId](https://firebase.google.com/docs/reference/js/ai.templaterequest#templaterequesttemplateid) | string | ***(Public Preview)*** The ID of the server prompt template to use. |
| [templateVariables](https://firebase.google.com/docs/reference/js/ai.templaterequest#templaterequesttemplatevariables) | Record\<string, unknown\> | ***(Public Preview)*** A key-value map of variables to populate the template with. |
| [toolConfig](https://firebase.google.com/docs/reference/js/ai.templaterequest#templaterequesttoolconfig) | [TemplateToolConfig](https://firebase.google.com/docs/reference/js/ai.templatetoolconfig#templatetoolconfig_interface) | ***(Public Preview)*** Optional tool configuration for this request. Only retrieval/grounding configs are supported for server prompt templates with unary and streaming `generateContent`. |

## TemplateRequest.templateId

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The ID of the server prompt template to use.

**Signature:**

    templateId: string;

## TemplateRequest.templateVariables

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

A key-value map of variables to populate the template with.

**Signature:**

    templateVariables: Record<string, unknown>;

## TemplateRequest.toolConfig

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Optional tool configuration for this request. Only retrieval/grounding configs are supported for server prompt templates with unary and streaming `generateContent`.

**Signature:**

    toolConfig?: TemplateToolConfig;