Public APIFree todayAPI beta — join waitlist

Developers

Build against your prompt library. Dev base URL: http://localhost:4000 · Auth header: x-api-key

/

API Quick Start

Base URL (dev): http://localhost:4000 · Auth: x-api-key: YOUR_API_KEY

Use project/user IDs from your dashboard. Keep keys in .env.local; never hardcode in client code.

📂 Projects

Public access. All endpoints are namespaced by /users/:USER_ID.

List all projects

/bash
curl http://localhost:4000/users/USER_ID/projects \
  -H "x-api-key: YOUR_API_KEY"

Get one project

/bash
curl http://localhost:4000/users/USER_ID/projects/PROJECT_ID \
  -H "x-api-key: YOUR_API_KEY"

✨ Prompts

Public access.

Get all prompts across all projects

/bash
curl http://localhost:4000/users/USER_ID/prompts \
  -H "x-api-key: YOUR_API_KEY"

(Optional) filter by tag

/bash
curl "http://localhost:4000/users/USER_ID/prompts?tag=marketing" \
  -H "x-api-key: YOUR_API_KEY"

Example response shape

/json
{
  "success": true,
  "data": [
    {
      "id": "PROMPT_ID_1",
      "title": "Welcome Prompt",
      "body": "Hello, world!",
      "tags": ["intro","test"],
      "createdAt": 1710000000000,
      "updatedAt": 1710000100000,
      "visibility": "public",
      "version": 1,
      "projectId": "PROJECT_A"
    },
    {
      "id": "PROMPT_ID_2",
      "title": "Checkout CTA",
      "body": "Buy now!",
      "tags": ["cta"],
      "createdAt": 1710000200000,
      "updatedAt": 1710000300000,
      "visibility": "private",
      "version": 2,
      "projectId": "PROJECT_B"
    }
  ]
}

JS (browser/fetch) example

/ts
const res = await fetch("http://localhost:4000/users/USER_ID/prompts", {
  method: "GET",
  headers: { "x-api-key": "YOUR_API_KEY" }
});
const { data } = await res.json(); // array of prompts with projectId
console.log(data);

Prompts for one project

/bash
curl http://localhost:4000/users/USER_ID/prompts/PROJECT_ID \
  -H "x-api-key: YOUR_API_KEY"

Get one prompt by ID

/bash
curl http://localhost:4000/users/USER_ID/prompts/PROJECT_ID/PROMPT_ID \
  -H "x-api-key: YOUR_API_KEY"

✅ Create / Update / Delete

Public access.

Create a new prompt in a project

/bash
curl -X POST http://localhost:4000/users/USER_ID/prompts/PROJECT_ID \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Welcome Prompt",
    "body": "Hello, world!",
    "tags": ["intro","test"],
    "visibility": "public",
    "version": 1
  }'

Update a prompt

/bash
curl -X PUT http://localhost:4000/users/USER_ID/prompts/PROJECT_ID/PROMPT_ID \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Prompt",
    "body": "Updated text",
    "tags": ["updated","demo"],
    "visibility": "private",
    "version": 2
  }'

Delete a prompt

/bash
curl -X DELETE http://localhost:4000/users/USER_ID/prompts/PROJECT_ID/PROMPT_ID \
  -H "x-api-key: YOUR_API_KEY"

JavaScript / TypeScript

Minimal fetch helpers.

client.ts

/ts
const BASE = 'http://localhost:4000';
const API_KEY = process.env.NEXT_PUBLIC_API_KEY || 'YOUR_API_KEY';

async function api(path: string, init: RequestInit = {}) {
  const res = await fetch(`${BASE}${path}`, {
    ...init,
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json', ...(init.headers || {}) },
    cache: 'no-store',
  });
  if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
  return res.json();
}

export const listProjects = (userId: string) => api(`/users/${userId}/projects`);
export const listPromptsByTag = (userId: string, tag: string) => api(`/users/${userId}/prompts?tag=${encodeURIComponent(tag)}`);
export const createPrompt = (userId: string, projectId: string, payload: any) =>
  api(`/users/${userId}/prompts/${projectId}`, { method: 'POST', body: JSON.stringify(payload) });
export const updatePrompt = (userId: string, projectId: string, promptId: string, payload: any) =>
  api(`/users/${userId}/prompts/${projectId}/${promptId}`, { method: 'PUT', body: JSON.stringify(payload) });
export const deletePrompt = (userId: string, projectId: string, promptId: string) =>
  api(`/users/${userId}/prompts/${projectId}/${promptId}`, { method: 'DELETE' });

Python

requests example.

client.py

/py
import os, requests

BASE = "http://localhost:4000"
API_KEY = os.getenv("HIVE_PROMPT_API_KEY", "YOUR_API_KEY")
HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"}

def list_projects(user_id: str):
    r = requests.get(f"{BASE}/users/{user_id}/projects", headers=HEADERS); r.raise_for_status(); return r.json()

def list_prompts(user_id: str, tag: str | None = None):
    url = f"{BASE}/users/{user_id}/prompts"
    if tag: url += f"?tag={tag}"
    r = requests.get(url, headers=HEADERS); r.raise_for_status(); return r.json()

def create_prompt(user_id: str, project_id: str, payload: dict):
    r = requests.post(f"{BASE}/users/{user_id}/prompts/{project_id}", json=payload, headers=HEADERS); r.raise_for_status(); return r.json()

def update_prompt(user_id: str, project_id: str, prompt_id: str, payload: dict):
    r = requests.put(f"{BASE}/users/{user_id}/prompts/{project_id}/{prompt_id}", json=payload, headers=HEADERS); r.raise_for_status(); return r.json()

def delete_prompt(user_id: str, project_id: str, prompt_id: str):
    r = requests.delete(f"{BASE}/users/{user_id}/prompts/{project_id}/{prompt_id}", headers=HEADERS); r.raise_for_status(); return {"deleted": True}

SDKs — coming soon

npm

/bash
npm i @llm-prompt-manager/sdk   # not yet published

import { Client } from '@llm-prompt-manager/sdk';
const client = new Client({ apiKey: process.env.PROMPT_API_KEY });
const prompts = await client.prompts.list({ userId: 'USER_ID', tag: 'marketing' });

pip

/bash
pip install prompt_manager_sdk   # not yet published

from prompt_manager_sdk import Client
client = Client(api_key="YOUR_API_KEY")
prompts = client.prompts.list(user_id="USER_ID", tag="marketing")