---
canonical_url: "https://docs.composio.dev/toolkits/prompt_hub"
markdown_url: "https://docs.composio.dev/toolkits/prompt_hub.md"
product: "platform"
version: null
last_updated: null
---

# PromptHub

Manage, retrieve, and execute versioned prompts and projects through the PromptHub API.

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 4
- **Triggers:** 0
- **Slug:** `PROMPT_HUB`
- **Version:** 20260910_00

## Tools

### Get Current Team

**Slug:** `PROMPT_HUB_GET_CURRENT_TEAM`

Return the current PromptHub team ID for the connected account. Use it when a team-scoped operation must target an explicit team.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Project Head

**Slug:** `PROMPT_HUB_GET_PROJECT_HEAD`

Retrieve a project's latest committed prompt and model configuration, with optional branch and variable resolution.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `branch` | string | No | Branch whose head to retrieve; omit it to use the project's default branch. |
| `variables` | object | No | Prompt variable overrides keyed by variable label. Unknown labels are ignored by PromptHub. |
| `project_id` | integer | Yes | PromptHub project ID returned by List Projects or shown in the project URL/API tab. |
| `use_fallback_defaults` | boolean | No | Whether to fill missing variables from PromptHub project and team defaults. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Projects

**Slug:** `PROMPT_HUB_LIST_PROJECTS`

List projects in a PromptHub team, optionally filtered by group, model, or provider.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `group` | string | No | Only return projects in this group name. |
| `model` | string | No | Only return projects whose head revision uses this model. |
| `team_id` | integer | No | PromptHub team ID. Omit it to list projects in the connected account's current team. |
| `provider` | string | No | Only return projects whose head revision uses this model provider, such as OpenAI, Anthropic, Azure, Google, or Amazon. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Run Project

**Slug:** `PROMPT_HUB_RUN_PROJECT`

Execute a committed PromptHub project prompt with optional variables and return the generated text, usage, cost, and timing metadata. This invokes the configured LLM, consumes the PromptHub plan's LLM request quota, and creates persistent run history in the project's Logs tab.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `hash` | string | No | Specific commit hash to execute. Omit it to use the latest commit on the selected or default branch. |
| `branch` | string | No | Branch to execute. Omit it to use the latest commit on the project's default branch. |
| `variables` | object | No | Runtime values for the project's prompt variables, keyed by variable label. |
| `project_id` | integer | Yes | PromptHub project ID returned by List Projects or shown in the project URL or API tab. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
