Base URL
https://preflight-api.vertixiq.com/v1/preflight-api
JSON in, JSON out. Send Content-Type: application/json. Request bodies are limited to 200 KB.
Authentication
Every request carries an API key as a bearer token:
Authorization: Bearer pfk_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keys are issued by VertixIQ and tied to a Pre-Flight account. They are stored hashed and cannot be recovered; a lost key is revoked and replaced. Keys are accepted only in the header, never in the request body.
Call 1 · Preflight
Scopes the prompt, classifies its intent, assigns a risk tier, and marks every missing detail as a numbered placeholder. Issues a new session_id.
Request body
| Field | Type | Description |
|---|---|---|
prompt | string, required | The raw prompt. 10 to 10,000 characters. |
target_model | string, optional | The model the prompt will be sent to. Shapes the formatting of scoped_prompt. Default other (generic markdown). See enum values. |
Response body · 200
| Field | Type | Description |
|---|---|---|
session_id | UUID v4 | Audit identifier for this prompt. Pass it to Converge. Also returned in the X-Preflight-Session-Id header. |
scoped_prompt | string | The improved prompt. Each missing detail appears as [x1: LABEL], [x2: LABEL], … The same gap repeated uses the same id. |
placeholders | array | { "id", "label", "example" } per distinct gap, in order of first appearance. example may be null. |
intent | string | What the prompt is trying to accomplish. |
risk_tier | string | low, medium, or high: how likely the original prompt was to produce fabricated or unreliable output. |
target_model_echo | string | The target_model applied. |
Example
curl -X POST https://preflight-api.vertixiq.com/v1/preflight-api/preflight \
-H "Authorization: Bearer $PREFLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Plan a trip to Lisbon for me",
"target_model": "gpt-5"
}'
{
"session_id": "3f9c2a71-5b0e-4c8d-9a61-7e2f4b8d1c05",
"scoped_prompt": "## Task\nPlan a [x1: NUMBER OF DAYS] trip to Lisbon.\n\n## Constraints\n- Budget: [x2: BUDGET]\n- Flag any opening hours or prices you cannot confirm.",
"placeholders": [
{ "id": "x1", "label": "number of days", "example": "5-day" },
{ "id": "x2", "label": "budget", "example": "mid-range, $200/day" }
],
"intent": "trip_planning",
"risk_tier": "low",
"target_model_echo": "gpt-5"
}
Call 2 · Converge
Fills every placeholder in scoped_prompt with your values and returns the finalized prompt. No model is called; the substitution is exact. The flow is stateless: you send the scoped prompt back. The session_id must come from a successful Preflight call made with the same API key; Converge reads that call's intent and risk_tier from the audit record.
Request body
| Field | Type | Description |
|---|---|---|
session_id | UUID, required | From the Preflight response. |
scoped_prompt | string, required | The scoped_prompt from Preflight. Up to 40,000 characters. |
placeholder_data | object, required | Map of placeholder id to value, e.g. {"x1": "5-day"}. Every id in the prompt needs a non-empty value; ids not in the prompt are rejected. Values up to 2,000 characters. |
target_model | string, optional | Echoed back. Default other. |
Response body · 200
| Field | Type | Description |
|---|---|---|
session_id | UUID | Echoed. |
finalized_prompt | string | The prompt with every placeholder filled, ready for the target model. |
intent | string | From the Preflight call. |
risk_tier | string | From the Preflight call. |
target_model_echo | string | The target_model applied. |
Example
curl -X POST https://preflight-api.vertixiq.com/v1/preflight-api/converge \
-H "Authorization: Bearer $PREFLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"session_id": "3f9c2a71-5b0e-4c8d-9a61-7e2f4b8d1c05",
"scoped_prompt": "## Task\nPlan a [x1: NUMBER OF DAYS] trip to Lisbon.\n\n## Constraints\n- Budget: [x2: BUDGET]\n- Flag any opening hours or prices you cannot confirm.",
"placeholder_data": { "x1": "5-day", "x2": "mid-range, $200/day" },
"target_model": "gpt-5"
}'
{
"session_id": "3f9c2a71-5b0e-4c8d-9a61-7e2f4b8d1c05",
"finalized_prompt": "## Task\nPlan a 5-day trip to Lisbon.\n\n## Constraints\n- Budget: mid-range, $200/day\n- Flag any opening hours or prices you cannot confirm.",
"intent": "trip_planning",
"risk_tier": "low",
"target_model_echo": "gpt-5"
}
Enum values
target_model
| Value | Formatting applied to scoped_prompt |
|---|---|
claude-sonnet-4.7 | XML-tagged sections (context, task, constraints, output format). |
gpt-5 | Markdown headings with bullet lists. |
gemini-pro-2 | Markdown headings; task first, then context, constraints, output format. |
llama-3-70b | Compact, flat labelled sections for smaller context windows. |
other | Generic markdown. The default. |
target_model controls formatting only. It does not change the model Pre-Flight uses to scope your prompt.
intent
| Value | Meaning |
|---|---|
trip_planning | Travel, itineraries, events, logistics. |
code_gen | Writing, reviewing, or debugging software or queries. |
factual_query | Looking up facts, rules, definitions, or how something works. |
creative_task | Fiction, marketing copy, naming, brainstorming, social posts. |
analysis | Evaluating data, documents, contracts, markets, options, or risks. |
customer_facing | Content that will be sent to customers, clients, patients, or the public. |
other | None of the above clearly fits. |
risk_tier
| Value | Meaning |
|---|---|
low | Little factual exposure; improvements are about focus and structure. |
medium | Gaps that could lead to generic or partly invented output. |
high | Likely to produce fabricated facts, citations, figures, or obligations if sent as written. |
Rate limits
Limits are per API key and count both endpoints.
- 60 requests per minute. The window opens on the first request and lasts 60 seconds.
- 1,000 requests per calendar month (UTC) on the default tier.
Over either limit, the API returns 429 with a Retry-After header in seconds. A rejected request does not count against your quota. Higher limits are available per key.
HTTP/1.1 429 Too Many Requests
Retry-After: 23
{
"error": "RATE_LIMITED",
"message": "Per-minute request limit reached for this API key.",
"limit_type": "per_minute",
"retry_after_seconds": 23
}
Errors
Errors return { "error": CODE, "message": TEXT }, plus extra fields where noted.
| Status | error | When |
|---|---|---|
| 400 | INVALID_JSON | Body is not a JSON object. |
| 400 | INVALID_PROMPT_LENGTH | prompt outside 10 to 10,000 characters. |
| 400 | INVALID_INPUT | The prompt was rejected by input screening. |
| 400 | INVALID_SCOPED_PROMPT | scoped_prompt empty or over 40,000 characters. |
| 401 | INVALID_API_KEY | Missing, malformed, unknown, or revoked key. |
| 403 | ACCOUNT_INACTIVE | The account that owns the key is not active. |
| 404 | SESSION_NOT_FOUND | session_id is not a successful Preflight call made with this key. |
| 413 | BODY_TOO_LARGE | Body over 200 KB. |
| 422 | VALIDATION_ERROR | Missing or mistyped field, or unknown target_model. Includes details. |
| 422 | MISSING_PLACEHOLDERS | A placeholder has no value. Includes placeholder_ids. |
| 422 | UNKNOWN_PLACEHOLDERS | placeholder_data has ids not in the prompt. Includes placeholder_ids. |
| 422 | PLACEHOLDER_VALUE_TOO_LONG | A value is over 2,000 characters. Includes placeholder_ids. |
| 422 | CONTENT_REFUSED | The prompt could not be scoped under content policy. |
| 429 | RATE_LIMITED | See rate limits. |
| 500 | PROCESSING_ERROR | Unexpected error. Safe to retry. |
| 502 | UNPARSEABLE_RESPONSE, SCOPING_INCOMPLETE, PROCESSING_ERROR | Scoping did not complete cleanly. Safe to retry. |
| 503 | SERVICE_UNAVAILABLE | The scoping engine is temporarily unavailable. |
| 504 | TIMEOUT | Scoping took too long. Safe to retry. |
Preview. This API is in preview ahead of general availability. Enterprise pricing available on request.