Skip to main content
POST
/
prompts
Create a prompt
curl --request POST \
  --url https://api.adaline.ai/v2/prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "<string>",
  "title": "<string>",
  "draft": {
    "config": {
      "provider": "<string>",
      "model": "<string>",
      "settings": {}
    },
    "messages": [
      {
        "role": "system",
        "content": [
          {
            "modality": "text",
            "value": "<string>"
          }
        ]
      }
    ],
    "tools": [
      {
        "type": "function",
        "definition": {
          "schema": {
            "name": "<string>",
            "description": "<string>",
            "parameters": {},
            "strict": true
          }
        },
        "request": {
          "type": "http",
          "method": "get",
          "url": "<string>",
          "headers": {},
          "query": {},
          "body": {},
          "proxyUrl": "<string>",
          "proxyHeaders": {},
          "retry": {
            "maxAttempts": 2,
            "initialDelay": 2,
            "exponentialFactor": 2
          }
        }
      }
    ]
  }
}
'
{
  "id": "<string>",
  "title": "<string>",
  "icon": {
    "type": "emoji",
    "value": "<string>"
  },
  "projectId": "<string>",
  "createdAt": 17450965800000,
  "updatedAt": 17450965800000,
  "defaultPlaygroundId": "<string>",
  "draft": {
    "config": {
      "provider": "<string>",
      "model": "<string>",
      "settings": {}
    },
    "messages": [
      {
        "role": "system",
        "content": [
          {
            "modality": "text",
            "value": "<string>"
          }
        ]
      }
    ],
    "tools": [
      {
        "type": "function",
        "definition": {
          "schema": {
            "name": "<string>",
            "description": "<string>",
            "parameters": {},
            "strict": true
          }
        },
        "request": {
          "type": "http",
          "method": "get",
          "url": "<string>",
          "headers": {},
          "query": {},
          "body": {},
          "proxyUrl": "<string>",
          "proxyHeaders": {},
          "retry": {
            "maxAttempts": 2,
            "initialDelay": 2,
            "exponentialFactor": 2
          }
        }
      }
    ],
    "variables": {}
  },
  "contentLinks": {},
  "defaultPlayground": {
    "id": "<string>",
    "messages": [
      {
        "role": "system",
        "content": [
          {
            "modality": "text",
            "value": "<string>"
          }
        ]
      }
    ],
    "variables": {},
    "title": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Workspace API key. Pass as Authorization: Bearer <key>.

Body

application/json
projectId
string
required

Unique identifier for an entity, between 20 and 80 characters.

Required string length: 20 - 80
title
string

Display title for an entity, up to 50 characters.

Required string length: 1 - 50
icon
Base Entity Icon · object

Icon for an entity, either an emoji or an image URL. Discriminated by type.

draft
object

Response

Prompt created.

A complete prompt with draft, playground, and published versions.

id
string
required

Unique identifier for an entity, between 20 and 80 characters.

Required string length: 20 - 80
title
string
required

Display title for an entity, up to 50 characters.

Required string length: 1 - 50
icon
Base Entity Icon · object
required

Icon for an entity, either an emoji or an image URL. Discriminated by type.

projectId
string
required

Unique identifier for an entity, between 20 and 80 characters.

Required string length: 20 - 80
createdAt
integer<int64>
required

Unix timestamp in milliseconds.

Required range: 1672511400000 <= x <= 33229420200000
updatedAt
integer<int64>
required

Unix timestamp in milliseconds.

Required range: 1672511400000 <= x <= 33229420200000
defaultPlaygroundId
string
required

Unique identifier for an entity, between 20 and 80 characters.

Required string length: 20 - 80
draft
Prompt Draft · object
required

A draft version of a prompt with config, messages, tools, and variables.

Map of content links (base64 content -> signed URL).

defaultPlayground
Prompt Playground · object

A prompt playground configuration with model settings and messages.