prompterdocs

prompter API

Ask one of nine AI platforms a single question and get the raw answer back, with native citations where the platform provides them. prompter is stateless: every call is a real, live upstream request.

Overview

prompter exposes a small REST API. You send a prompt and a platform, prompter calls that platform, and returns the unmodified answer. It never summarizes or invents data: if a platform cannot answer, the response says so.

Base URL

base url
https://api.prompter.searchestra.com

Conventions

  • All request and response bodies are application/json.
  • Successful reads return a top level data field. Errors return a top level error field (see Errors).
  • Every /v1/* endpoint requires the X-API-Key header. /healthz does not.
  • Timestamps are UTC, ISO 8601 (for example 2026-08-16T13:47:09Z).
Honesty principle. On 4xx the error message is real and specific. On 5xx (500 and 503) the message is always masked to a fixed string; the real cause is only in prompter's server logs.

Quickstart

Send your first query. Replace pr_your_key with the API key issued to your tenant (see Authentication).

requestcurl
curl -X POST https://api.prompter.searchestra.com/v1/collect \
  -H "X-API-Key: pr_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "perplexity",
    "promptText": "which dishwasher detergent is best, briefly",
    "countryCode": "tr",
    "language": "tr"
  }'
response200
{
  "data": {
    "rawText": "Finish and Fairy are among the most preferred...",
    "rawHtml": "",
    "citations": [
      { "url": "https://example.com/review", "title": "Best detergent", "position": 1 }
    ],
    "textLinks": [],
    "collectedAt": "2026-08-16T13:47:09Z"
  }
}

Authentication

Every /v1/* request must carry an API key in the X-API-Key header. Keys begin with the pr_ prefix and identify a tenant, not a user.

header
X-API-Key: pr_your_key

The server stores only a SHA-256 hash of the key. The raw value is shown once, at creation, and cannot be recovered. If a key is lost, issue a new one. A tenant can hold several keys; revoking one does not affect the others.

Getting a key. Keys are provisioned per tenant during onboarding. A missing or revoked key returns 401 unauthorized with a clear message.

Query a platform

POST/v1/collect

Sends one prompt to one platform and returns the raw answer. The flow: validate promptText, confirm the platform is registered, then make a real upstream request.

Request body

FieldTypeNotes
platform requiredstringOne of the nine codes (see Platforms).
promptText requiredstringThe question to ask. Must not be empty.
countryCode optionalstringISO country code (for example tr, us). Localizes the system instruction.
language optionalstringLanguage code. Used only by aimode and aio; other platforms ignore it.
timeoutMs optionalintegerUpper bound including retries, in milliseconds. Defaults to 25000.

Response data

FieldTypeNotes
rawTextstringThe raw answer text. May be empty for aimode and aio when the model produced no AI summary. That is an honest empty result, not an error.
rawHtmlstringReserved. Always empty for now.
citationsarraySources the provider explicitly returned. Only perplexity, aimode and aio populate this. Never null.
textLinksarrayLinks observed inside the answer text (Markdown links). Not proof of retrieval. Never null.
collectedAtstringprompter's UTC timestamp for the call.
Citations vs textLinks. citations are the provider's native sources. textLinks are links the model wrote into its prose. They use different ordering systems, so relate them by URL, not by position.

List platforms

GET/v1/platforms

Returns the fixed list of registered platforms. A platform whose credentials are not configured still appears here; it only fails on a real /v1/collect call. Fetch this once and cache it on your side.

response200
{
  "data": [
    { "code": "chatgpt", "unsupportedCountries": [] },
    { "code": "perplexity", "unsupportedCountries": null }
  ]
}

unsupportedCountries is either an empty array or null; both mean "no restriction". Treat them the same way.

Health check

GET/healthz

Liveness probe for container orchestration. No authentication. Returns 200 when the service is up.

Platforms

Nine platforms have a real integration. citations are native only on the three sourced platforms; the six LLM platforms surface links through textLinks instead.

CodeProviderCitations
chatgptOpenAI Chat CompletionstextLinks only
claudeAnthropic MessagestextLinks only
geminiGoogle Generative LanguagetextLinks only
deepseekDeepSeek Chat CompletionstextLinks only
grokxAI Chat CompletionstextLinks only
metaaiMeta Model APItextLinks only
perplexityPerplexity Sonarnative
aimodeGoogle AI Mode (DataForSEO)native
aioGoogle AI Overviews (DataForSEO)native

Errors

Errors return an error object with a code and a message.

error envelope
{ "error": { "code": "unauthorized", "message": "X-API-Key required." } }
StatuscodeWhen
400validation_failedEmpty promptText, or the country is not supported.
401unauthorizedMissing, invalid or revoked API key.
404not_foundUnknown platform code (typo, or a platform with no integration).
422quota_exceededDaily request quota or cost budget for this tenant and platform is spent. Try again tomorrow.
429rate_limitedPer-key requests per minute or concurrency limit exceeded. Retry shortly.
500internalUpstream or internal failure. Message is masked.
503unavailablePlatform not configured, or its circuit breaker is open. Message is masked.
422 vs 429. 422 means "try again tomorrow" (a daily budget is spent). 429 means "try again shortly" (a short window limit). Do not confuse them.

Rate limits and quotas

prompter applies four independent guards. The first two are per API key and return 429; the next two are per tenant and platform and return 422; the last is shared across all tenants and returns 503.

GuardScopeOn limit
Requests per minuteper API key429 rate_limited
Concurrent requestsper API key429 rate_limited
Daily request quotaper tenant and platform422 quota_exceeded
Daily cost budgetper tenant and platform422 quota_exceeded
Circuit breakerper platform, all tenants503 unavailable

Limits scale with your plan. The circuit breaker opens after a platform fails repeatedly and closes automatically after a cooldown.