---
title: "POST /model-hub/prompt-templates/{id}/run_template/"
method: POST
path: "/model-hub/prompt-templates/{id}/run_template/"
tags: ["model-hub"]
---

# POST /model-hub/prompt-templates/{id}/run_template/

`POST /model-hub/prompt-templates/{id}/run_template/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/model-hub/prompt-templates/{id}/run_template/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Run a prompt template with the given configuration.

## Request body

- PromptRunRequest
  - `name` string
  - `version` string
  - `prompt_config` PromptRunConfiguration[]
    - `messages` MessageItem[]
      - `role` string, required
      - `content` object, required: Plain text string or array of content-part objects.
      - `name` string
      - `tool_calls` object: Any valid JSON value.
      - `tool_call_id` string
      - `id` string
    - `configuration` PromptRunModelConfiguration
      - `tool_choice` string, nullable
      - `template_format` string, nullable
      - `tools` object[], nullable
      - `output_format` string, nullable
      - `model_type` string, nullable
      - `model_detail` object, nullable: Any valid JSON value.
      - `voice_id` string, nullable
      - `temperature` number, nullable
      - `max_tokens` integer, nullable
      - `top_p` number, nullable
      - `frequency_penalty` number, nullable
      - `presence_penalty` number, nullable
      - `response_format` object, nullable: String or JSON object.
      - `model` object: String or JSON object.
  - `variable_names` object
  - `placeholders` object, nullable: Any valid JSON value.
  - `evaluation_configs` object[]
  - `source` string
  - `is_run` object, nullable: Any valid JSON value.
  - `is_sdk` boolean
  - `run_index` integer, nullable

## Response `201`

Created

- PromptRunRequest
  - `name` string
  - `version` string
  - `prompt_config` PromptRunConfiguration[]
    - `messages` MessageItem[]
      - `role` string, required
      - `content` object, required: Plain text string or array of content-part objects.
      - `name` string
      - `tool_calls` object: Any valid JSON value.
      - `tool_call_id` string
      - `id` string
    - `configuration` PromptRunModelConfiguration
      - `tool_choice` string, nullable
      - `template_format` string, nullable
      - `tools` object[], nullable
      - `output_format` string, nullable
      - `model_type` string, nullable
      - `model_detail` object, nullable: Any valid JSON value.
      - `voice_id` string, nullable
      - `temperature` number, nullable
      - `max_tokens` integer, nullable
      - `top_p` number, nullable
      - `frequency_penalty` number, nullable
      - `presence_penalty` number, nullable
      - `response_format` object, nullable: String or JSON object.
      - `model` object: String or JSON object.
  - `variable_names` object
  - `placeholders` object, nullable: Any valid JSON value.
  - `evaluation_configs` object[]
  - `source` string
  - `is_run` object, nullable: Any valid JSON value.
  - `is_sdk` boolean
  - `run_index` integer, 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)
