---
title: "Use Template"
method: POST
path: "/api/templates/{template_id}/use"
tags: ["templates"]
---

# Use Template

`POST /api/templates/{template_id}/use`

Use a template to create an agent (records usage count)

Args:
    template_id: ID of the template to use

Returns:
    Success message

Raises:
    HTTPException: If template not found

## Path parameters

- `template_id` string, required

## Response `200`

Successful Response

- object

## 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)
