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.
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.
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.
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.
Example request
curl -X DELETE https://api.hyperoru.com/api/prompts/1
Example response
Copy template
POST /api/prompts//copy
Duplicate an existing prompt template.
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.
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
Preview prompt
POST /api/prompts/preview
Render a prompt template with variable substitution.
Template content with variables.
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.
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.
Example request
curl -X DELETE https://api.hyperoru.com/api/prompts/bindings/1
Example response
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.
Existing conversation ID to continue.
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.
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.
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" }
]