Skip to main content
POST
/
prompts
/
get
Get prompt by package name
curl --request POST \
  --url https://api.baytos.ai/v1/prompts/get \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "package_name": "@workspace/customer-support:v1",
  "variables": {}
}
'
{
  "id": "pmt_abc123",
  "title": "Customer Support Assistant",
  "content": "You are a helpful customer support agent for Acme Corp...",
  "systemPrompt": "Be professional, courteous, and helpful",
  "description": "AI assistant for customer support inquiries",
  "category": "support",
  "tags": [
    "customer-service",
    "support"
  ],
  "version": "v1",
  "workspaceSlug": "acme-corp",
  "packageName": "@acme-corp/support-assistant:v1",
  "context": [
    {
      "id": "ctx_file_123",
      "type": "file",
      "label": "Product FAQ",
      "fileName": "product-faq.pdf",
      "fileSize": 52428,
      "mimeType": "application/pdf",
      "createdAt": 1705497600000
    },
    {
      "id": "ctx_url_456",
      "type": "url",
      "label": "Knowledge Base",
      "url": "https://example.com/kb",
      "urlFetchedAt": 1705497600000,
      "createdAt": 1705497000000
    }
  ],
  "metadata": {
    "createdAt": 1705400000000,
    "generatedAt": 1705497600000
  }
}

Authorizations

Authorization
string
header
required

API key obtained from https://claro.baytos.ai

Body

application/json
package_name
string
required

Package name (combination of workspace, package, and version)

Example:

"@workspace/customer-support:v1"

variables
object

Variables to substitute in the prompt

Response

Successfully retrieved and processed prompt

id
string

Unique prompt identifier

title
string

Prompt title

content
string

Main prompt content (with variables substituted)

systemPrompt
string | null

System prompt content

critiquePrompt
string | null

Critique prompt content

description
string | null

Prompt description

category
string | null

Prompt category

tags
string[]

Prompt tags

version
string

Version identifier

workspaceSlug
string

Workspace slug

packageName
string

Full package name

context
object[]

Attached context files and URLs

metadata
object