---
title: "Create Template"
method: POST
path: "/v1/admin/templates"
tags: ["Admin Management"]
---

# Create Template

`POST /v1/admin/templates`

## Request

- Base URL: `https://api.oneinfer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.oneinfer.ai/v1/admin/templates`
- Auth: HTTP bearer

Create a new template in the database

## Request body

- TemplateRequest
  - `template_name` string, required
  - `template_description` string, required
  - `template_image` string, required
  - `registry_auth_id` string, nullable
  - `disk_size` integer, nullable
  - `model_id` string, nullable
  - `template_command` string, nullable
  - `ports` string[]
  - `template_env` object, nullable
  - `is_serverless` boolean
  - `template_volumes` VolumeSchema[], nullable
    - `name` string, nullable
    - `size` integer, nullable
    - `mount_path` string, nullable
  - `template_network_storages` NetworkStorageSchema[], nullable
    - `id` string, nullable
    - `mount_point` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oneinfer/apis/oneinfer-apis.md) · [All operations](https://skmtc.dev/oneinfer/apis/oneinfer-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/oneinfer/apis/oneinfer-apis/revisions/5479122617c3?raw)
