---
title: "Fetch a prompt version by template name and either explicit version or label."
method: GET
path: "/model-hub/prompt-labels/get-by-name/"
tags: ["model-hub"]
---

# Fetch a prompt version by template name and either explicit version or label.

`GET /model-hub/prompt-labels/get-by-name/`

## Request

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

Query params:
  - name: template name (required)
  - version: version name like v1 (optional)
  - label: label name like Production/Staging/Development or custom (optional)

## Query parameters

- `page` integer
- `limit` integer

## Response `200`

OK

- object
  - `count` integer, required
  - `next` string, uri, nullable
  - `previous` string, uri, nullable
  - `results` PromptLabel[], required
    - `id` string, uuid
    - `organization` string, uuid
    - `name` string, required
    - `type` 'system' | 'custom', required
    - `metadata` object, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error
- `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)
