Skip to main content

Single-call generation

The simplest way to generate content — just pass a template_id and user_direction:
curl -X POST https://draftliftai.com/api/v1/generate \
  -H "Authorization: Bearer dl_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1,
    "user_direction": "Write about AI transforming content marketing"
  }'
The API auto-creates a content record and returns its content_id in the response. Use this ID for all downstream operations (retrieve, edit, finalize).

With memories and references

Attach memories for voice/context and reference materials for source content:
curl -X POST https://draftliftai.com/api/v1/generate \
  -H "Authorization: Bearer dl_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 1,
    "user_direction": "Write about AI transforming content marketing",
    "memory_ids": [1, 5, 12],
    "reference_material_ids": [3]
  }'

Generate against an existing draft

If you’ve already created a content record (via the dashboard or Create Content), pass its content_id:
curl -X POST https://draftliftai.com/api/v1/generate \
  -H "Authorization: Bearer dl_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "content_id": 123,
    "template_id": 1,
    "user_direction": "Write about AI transforming content marketing"
  }'

Next steps

After generation, retrieve the content to review it, then finalize to save your edited version and trigger learning analysis.