Skip to main content

Quick Start

1. Create System Prompt

curl -X POST https://api.cuadra.ai/v1/system-prompts \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support",
    "description": "Professional support with safety guardrails"
  }'

2. Add Particles

curl -X POST https://api.cuadra.ai/v1/system-prompts/sp_abc123/particles \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"particleId": "part_role_001", "order": 1}'

3. View Composed Prompt

curl https://api.cuadra.ai/v1/system-prompts/sp_abc123/compose \
  -H "Authorization: Bearer YOUR_TOKEN"
Response:
{
  "composedPrompt": "You are a professional customer support agent...",
  "totalTokens": 150,
  "particles": [
    { "id": "part_abc", "category": "role", "version": 2, "tokenCount": 25 }
  ]
}

Version Pinning

EnvironmentStrategyWhy
DevelopmentUnpinnedAlways test latest particle versions
StagingUnpinnedCatch issues before production
ProductionPinnedStability and predictability
To pin a particle to a specific version:
curl -X POST https://api.cuadra.ai/v1/system-prompts/sp_abc123/particles \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "particleId": "part_xyz789",
    "particleVersionId": "pv_v2"
  }'