Skip to main content

List prompts

GET /api/prompts/

List all prompt templates. Example request
curl https://api.hyperoru.com/api/prompts/
Example response
[
  { "id": 1, "name": "BTC Trend Follower", "content": "Analyze BTC...", "created_at": "2026-04-01T00:00:00Z" }
]

Create template

POST /api/prompts/

Create a new prompt template.
name
string
required
Template name.
content
string
required
Prompt template content with variable placeholders.
Example request
curl -X POST https://api.hyperoru.com/api/prompts/ \
  -H "Content-Type: application/json" \
  -d '{"name": "Momentum Strategy", "content": "Analyze {{symbol}} momentum..."}'
Example response
{
  "id": 2,
  "name": "Momentum Strategy",
  "content": "Analyze {{symbol}} momentum...",
  "created_at": "2026-04-09T12:00:00Z"
}

Get template

GET /api/prompts/

Retrieve a single prompt template.
id
integer
required
Template ID.
Example request
curl https://api.hyperoru.com/api/prompts/1
Example response
{
  "id": 1,
  "name": "BTC Trend Follower",
  "content": "Analyze BTC price action...",
  "created_at": "2026-04-01T00:00:00Z"
}

Update template

PUT /api/prompts/

Update a prompt template.
id
integer
required
Template ID.
name
string
Updated name.
content
string
Updated prompt content.
Example request
curl -X PUT https://api.hyperoru.com/api/prompts/1 \
  -H "Content-Type: application/json" \
  -d '{"content": "Analyze BTC price action with RSI and MACD..."}'
Example response
{
  "id": 1,
  "name": "BTC Trend Follower",
  "content": "Analyze BTC price action with RSI and MACD..."
}

Delete template

DELETE /api/prompts/

Delete a prompt template.
id
integer
required
Template ID.
Example request
curl -X DELETE https://api.hyperoru.com/api/prompts/1
Example response
{
  "status": "ok"
}

Copy template

POST /api/prompts//copy

Duplicate an existing prompt template.
template_id
integer
required
Template ID to copy.
Example request
curl -X POST https://api.hyperoru.com/api/prompts/1/copy
Example response
{
  "id": 3,
  "name": "BTC Trend Follower (copy)",
  "content": "Analyze BTC price action..."
}

Rename template

PATCH /api/prompts//name

Rename a prompt template.
template_id
integer
required
Template ID.
name
string
required
New template name.
Example request
curl -X PATCH https://api.hyperoru.com/api/prompts/1/name \
  -H "Content-Type: application/json" \
  -d '{"name": "BTC Momentum v2"}'
Example response
{
  "status": "ok"
}

Preview prompt

POST /api/prompts/preview

Render a prompt template with variable substitution.
content
string
required
Template content with variables.
variables
object
Variable values to substitute.
Example request
curl -X POST https://api.hyperoru.com/api/prompts/preview \
  -H "Content-Type: application/json" \
  -d '{"content": "Analyze {{symbol}} at {{price}}", "variables": {"symbol": "BTC", "price": "68500"}}'
Example response
{
  "rendered": "Analyze BTC at 68500"
}

List bindings

GET /api/prompts/bindings

List all prompt-to-account bindings. Example request
curl https://api.hyperoru.com/api/prompts/bindings
Example response
[
  { "id": 1, "template_id": 1, "account_id": 1 }
]

Create or update binding

POST /api/prompts/bindings

Bind a prompt template to an account.
template_id
integer
required
Prompt template ID.
account_id
integer
required
Target account ID.
Example request
curl -X POST https://api.hyperoru.com/api/prompts/bindings \
  -H "Content-Type: application/json" \
  -d '{"template_id": 1, "account_id": 1}'
Example response
{
  "id": 1,
  "template_id": 1,
  "account_id": 1
}

Delete binding

DELETE /api/prompts/bindings/

Remove a prompt-to-account binding.
id
integer
required
Binding ID.
Example request
curl -X DELETE https://api.hyperoru.com/api/prompts/bindings/1
Example response
{
  "status": "ok"
}

Variables reference

GET /api/prompts/variables-reference

List all available template variables and their descriptions. Example request
curl https://api.hyperoru.com/api/prompts/variables-reference
Example response
{
  "variables": [
    { "name": "symbol", "description": "Trading symbol", "example": "BTC" },
    { "name": "price", "description": "Current price", "example": "68500.00" }
  ]
}

AI chat

POST /api/prompts/ai-chat

Send a message to the AI assistant for prompt editing help.
message
string
required
User message.
conversation_id
string
Existing conversation ID to continue.
template_id
integer
Template ID for context.
Example request
curl -X POST https://api.hyperoru.com/api/prompts/ai-chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Help me add RSI analysis to this prompt", "template_id": 1}'
Example response
{
  "response": "Here is an updated prompt with RSI analysis...",
  "conversation_id": "conv-123"
}

AI chat stream

POST /api/prompts/ai-chat-stream

Stream an AI response for prompt editing. Returns a task ID for SSE polling.
message
string
required
User message.
conversation_id
string
Conversation ID.
Example request
curl -X POST https://api.hyperoru.com/api/prompts/ai-chat-stream \
  -H "Content-Type: application/json" \
  -d '{"message": "Improve this prompt for scalping"}'
Example response
{
  "task_id": "ai-task-456"
}

List AI conversations

GET /api/prompts/ai-conversations

List all prompt AI chat conversations. Example request
curl https://api.hyperoru.com/api/prompts/ai-conversations
Example response
[
  { "id": "conv-123", "title": "RSI prompt help", "created_at": "2026-04-09T12:00:00Z" }
]

Conversation messages

GET /api/prompts/ai-conversations//messages

Retrieve all messages in a prompt AI conversation.
conversation_id
string
required
Conversation ID.
Example request
curl https://api.hyperoru.com/api/prompts/ai-conversations/conv-123/messages
Example response
[
  { "role": "user", "content": "Help me add RSI analysis", "created_at": "2026-04-09T12:00:00Z" },
  { "role": "assistant", "content": "Here is an updated prompt...", "created_at": "2026-04-09T12:00:01Z" }
]