---
title: "Get Template"
method: GET
path: "/api/templates/{template_id}"
tags: ["templates"]
---

# Get Template

`GET /api/templates/{template_id}`

Get details of a single template (including agent_config)

Args:
    template_id: ID of the template to retrieve
    lang: Optional language code for localized descriptions

Returns:
    Detailed template information with agent configuration

Raises:
    HTTPException: If template not found

## Path parameters

- `template_id` string, required

## Query parameters

- `lang` string, nullable — Language code (e.g., 'en', 'zh')

## Response `200`

Successful Response

- TemplateDetail — Detailed template response including agent configuration
  - `id` string, required — Template unique identifier
  - `name` string, required — Template name
  - `category` string, required — Template category
  - `featured` boolean — Whether the template is featured
  - `description` string, required — Template description
  - `features` string[] — Template features
  - `connections` ConnectionInfo[] — App connections
    - `name` string, required — Name of the connection
    - `logo` string, nullable — URL to the logo image
  - `setup_time` string — Setup time
  - `tags` string[] — Template tags
  - `author` string, required — Template author
  - `version` string, required — Template version
  - `views` integer — Number of views
  - `likes` integer — Number of likes
  - `used_count` integer — Number of times used
  - `is_liked` boolean — Whether the current user liked this template
  - `agent_config` object, required — Agent configuration

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.net/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xorbitsai/xagent/revisions/33e4ba4936ad/schema)
