API referencePrompt toolsGenerate a prompt

Generate a prompt

⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/prompts/generate

Turn a plain description of a task into a first-draft system prompt and user template, with {{variables}} for the parts that change per request. Drafts follow the practices in Prompting: a clear role, explicit output format, examples placeholders and edge-case rules. Treat the result as a starting point to test, not a finished prompt.

For how this fits into a full workflow, see Prompt generator and improver.

Headers

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.
syntic-betaYes, while in previewprompt-tools-2026-12-01. Without it the call fails with 400 beta_required. See Versioning.
Content-TypeYesapplication/json

Body parameters

ParameterTypeRequiredNotes
taskstringYesWhat the prompt should accomplish, up to 4,000 characters.
target_modelstringNoThe model the prompt will run on. Default Amara S1.2.
variablesarray of stringsNoVariable names you want in the template. Proposed automatically if left out.
output_formatstringNotext, json or markdown. Guides the format section.
languagestringNoBCP 47 tag for the prompt’s language. Default en.

Response

200 OK, Content-Type: application/json

{
  "system": "You sort customer support emails for an online shop. … Reply with JSON only: {\"category\": …, \"order_number\": … }",
  "messages": [
    {
      "role": "user",
      "content": "<email>\n{{email_body}}\n</email>"
    }
  ],
  "variables": [
    "email_body"
  ],
  "notes": [
    "Add 3 to 5 real emails as examples once you have them.",
    "Decide what `other` should cover before production."
  ],
  "usage": {
    "input_tokens": 1820,
    "output_tokens": 640
  }
}
FieldTypeDescription
systemstringThe proposed system prompt.
messagesarrayThe user turn template.
notesarrayGaps the generator could not fill from the task description.
usageobjectBilled at the target model’s normal rate.

Examples

curl -sS "https://app.syntic.ai/v1/prompts/generate" \
  -H "Authorization: Bearer $SYNTIC_API_KEY" \
  -H "syntic-beta: prompt-tools-2026-12-01" \
  -H "Content-Type: application/json" \
  -d '{
      "task": "Classify incoming support emails into billing, technical, account or other, and extract the order number if there is one.",
      "variables": [
        "email_body"
      ],
      "output_format": "json"
    }'

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
400invalid_request_errortask_too_longtask is over 4,000 characters.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?