From skills
Create and manage prompts in Adaline via the API. Use when programmatically creating prompts, updating prompt drafts, listing prompts in a project, or managing prompt versions.
npx claudepluginhub adaline/skills --plugin skillsThis skill uses the workspace's default tool permissions.
Prompts are the central artifact in Adaline. Each prompt has a draft (the working version you iterate on), a config (provider, model, and inference settings), messages (system/user/assistant turns), tools (function definitions available to the model), and variables (template placeholders injected at inference time).
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Conducts multi-round deep research on GitHub repos via API and web searches, generating markdown reports with executive summaries, timelines, metrics, and Mermaid diagrams.
Dynamically discovers and combines enabled skills into cohesive, unexpected delightful experiences like interactive HTML or themed artifacts. Activates on 'surprise me', inspiration, or boredom cues.
Prompts are the central artifact in Adaline. Each prompt has a draft (the working version you iterate on), a config (provider, model, and inference settings), messages (system/user/assistant turns), tools (function definitions available to the model), and variables (template placeholders injected at inference time).
Key terms:
{{var_name}} in messages; resolved at inference timeSet these environment variables when your Adaline credentials are available:
ADALINE_API_KEY — your workspace API key (from Settings > API Keys at app.adaline.ai)projectId — your project ID (from the dashboard sidebar)You can start integrating before you have credentials. All code examples use placeholder values — replace them with real values when ready.
| Symptom | First Fix |
|---|---|
| POST /prompts returns 422 | Check that messages content uses the array format with modality and value fields |
| Variables not substituted at inference | Confirm variable names in messages exactly match the name field in the variables array (case-sensitive) |
| PATCH returns 404 | Verify the prompt ID — copy it from the Adaline editor URL |
| GET /prompts returns empty list | Confirm the projectId query parameter is present and correct |
| Draft changes not reflected in deployment | Draft edits never auto-deploy — you must explicitly create a deployment after editing |
Base URL: https://api.adaline.ai/v2
curl -X GET "https://api.adaline.ai/v2/prompts?projectId=PROJECT_ID&page=1&pageSize=20" \
-H "Authorization: Bearer $ADALINE_API_KEY"
Returns a paginated list of prompts in a project. Each item includes id, title, icon, createdAt, and updatedAt.
curl -X POST "https://api.adaline.ai/v2/prompts" \
-H "Authorization: Bearer $ADALINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"projectId": "PROJECT_ID",
"title": "My Prompt",
"draft": {
"config": {
"provider": "openai",
"model": "gpt-4o",
"settings": {
"temperature": 0.7,
"maxTokens": 1024
}
},
"messages": [
{
"role": "system",
"content": [{ "modality": "text", "value": "You are a helpful assistant." }]
},
{
"role": "user",
"content": [{ "modality": "text", "value": "Hello {{name}}" }]
}
],
"variables": [
{ "name": "name", "modality": "text" }
]
}
}'
Response includes the created prompt id and full draft object.
# Basic fetch
curl -X GET "https://api.adaline.ai/v2/prompts/PROMPT_ID" \
-H "Authorization: Bearer $ADALINE_API_KEY"
# With playground data expanded
curl -X GET "https://api.adaline.ai/v2/prompts/PROMPT_ID?expand=playground" \
-H "Authorization: Bearer $ADALINE_API_KEY"
curl -X PATCH "https://api.adaline.ai/v2/prompts/PROMPT_ID" \
-H "Authorization: Bearer $ADALINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated Title",
"draft": {
"config": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"settings": {
"temperature": 0.5,
"maxTokens": 2048
}
},
"messages": [
{
"role": "system",
"content": [{ "modality": "text", "value": "You are an expert assistant." }]
}
]
}
}'
curl -X DELETE "https://api.adaline.ai/v2/prompts/PROMPT_ID" \
-H "Authorization: Bearer $ADALINE_API_KEY"
Returns 204 No Content on success.
curl -X GET "https://api.adaline.ai/v2/prompts/PROMPT_ID/draft" \
-H "Authorization: Bearer $ADALINE_API_KEY"
Returns the full draft: config, messages, tools, and variables.
{
"config": {
"provider": "openai",
"model": "gpt-4o",
"settings": {
"temperature": 0.7,
"maxTokens": 1024,
"topP": 1.0,
"frequencyPenalty": 0,
"presencePenalty": 0
}
},
"messages": [
{
"role": "system",
"content": [{ "modality": "text", "value": "You are a helpful assistant." }]
},
{
"role": "user",
"content": [{ "modality": "text", "value": "Summarize this: {{document}}" }]
}
],
"tools": [
{
"name": "search_web",
"description": "Search the web for current information",
"parameters": {
"type": "object",
"properties": {
"query": { "type": "string", "description": "The search query" }
},
"required": ["query"]
}
}
],
"variables": [
{ "name": "document", "modality": "text" }
]
}
Each message has a role and a content array. Content items use a modality field to indicate type:
{
"role": "user",
"content": [
{ "modality": "text", "value": "Describe this image." },
{ "modality": "image_url", "value": "https://example.com/image.png" }
]
}
Supported roles: "system", "user", "assistant"
Supported modalities: "text", "image_url"
Variables declare template placeholders used in messages. Reference them in message text as {{var_name}}.
{ "name": "var_name", "modality": "text" }
Variable names must be alphanumeric with underscores. They are case-sensitive and must exactly match their usage in message content.
projectId and prompt IDs in environment variables, not hardcoded in sourceSee references/api.md for the full REST API reference with all request/response schemas, pagination details, and curl examples.