Generate a prompt
⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/prompts/generateTurn 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
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
syntic-beta | Yes, while in preview | prompt-tools-2026-12-01. Without it the call fails with 400 beta_required. See Versioning. |
Content-Type | Yes | application/json |
Body parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
task | string | Yes | What the prompt should accomplish, up to 4,000 characters. |
target_model | string | No | The model the prompt will run on. Default Amara S1.2. |
variables | array of strings | No | Variable names you want in the template. Proposed automatically if left out. |
output_format | string | No | text, json or markdown. Guides the format section. |
language | string | No | BCP 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
}
}| Field | Type | Description |
|---|---|---|
system | string | The proposed system prompt. |
messages | array | The user turn template. |
notes | array | Gaps the generator could not fill from the task description. |
usage | object | Billed 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:
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | beta_required | The syntic-beta header is missing. |
| 400 | invalid_request_error | task_too_long | task is over 4,000 characters. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Was this page helpful?