---
title: "GET /model-hub/prompt-templates/get-template-by-name/"
method: GET
path: "/model-hub/prompt-templates/get-template-by-name/"
tags: ["model-hub"]
---

# GET /model-hub/prompt-templates/get-template-by-name/

`GET /model-hub/prompt-templates/get-template-by-name/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/model-hub/prompt-templates/get-template-by-name/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Retrieve a prompt template by name.
If no version is specified, returns the default version (is_default=True).
If a version is specified, returns that specific version.

## Query parameters

- `name` string
- `version` string
- `created_at` string
- `search` string
- `ordering` string
- `page` integer
- `limit` integer

## Response `200`

OK

- object
  - `count` integer, required
  - `next` string, uri, nullable
  - `previous` string, uri, nullable
  - `results` PromptTemplate[], required
    - `id` string, uuid
    - `name` string, required
    - `description` string, nullable
    - `variable_names` object, nullable
    - `organization` string, uuid, nullable
    - `prompt_folder` string, uuid, nullable
    - `placeholders` object, nullable
    - `created_by` string, uuid, nullable

## Other responses

- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
