Skip to main content
The Krastie REST API lets Business and Enterprise customers automate AI visibility reporting, pull workspace analytics, and integrate content workflows into their stack.
API access requires a Business or Enterprise plan. Startup and free trial accounts cannot call the REST API, even with a valid key.

What you can build

Use casePrimary endpoints
Visibility dashboardsPOST/GET /seo-site-report, /seo-site-report/history
Agency client reportingPrefill, report, and history endpoints per workspace
Recommendation workflowsReport data + POST /improve-content-*
AI assistant integrationsPOST /chat with useWorkspaceContext: true
Start with the AI visibility endpoints — they are the core of the API.

Plan eligibility

PlanAPI accessMonthly AI credits
Free trialNo10
StartupNo300
BusinessYes500
EnterpriseYesUnlimited
Requests authenticated with an API key on a lower plan receive:
{
  "message": "API access requires a Business plan or higher.",
  "errCode": 403
}

Base URL

https://api.krastie.ai
All documented routes are prefixed with /v1.

Authentication

Send your API key in the api-key request header on every call:
api-key: krastie_abc123...
Content-Type: application/json
Keys use the krastie_ prefix, expire 30 days after generation, and are shown only once when created. Store them securely.

Create and manage keys

Key management uses your logged-in Krastie session (cookie auth), not the API key itself.
MethodEndpointDescription
GET/v1/users/api-keyKey metadata (prefix, expiry, name). Does not return the secret.
POST/v1/users/generateApiKeyCreate or rotate a key. Body: { "name": "My integration" }
DELETE/v1/users/api-keyRevoke the current key
Generate key response (200):
{
  "message": "API key successfully generated. Save it securely - you won't be able to see it again.",
  "apiKey": "krastie_...",
  "apiKeyPrefix": "krastie_abc1234",
  "expiresAt": "2026-07-07T12:00:00.000Z"
}

Usage and limits

  • Each successful AI text or chat request consumes 1 AI credit from your monthly plan allowance.
  • Visibility report refresh limits vary by plan. See the pricing page.
  • Image generation increments image-generation usage separately.
  • When credits are exhausted, endpoints return 403 with a plan-specific limit message.
  • Usage resets monthly for paid plans.
Premium models (o1, o3-mini, gpt-5, gpt-4.5) require a paid plan (Startup or above), not just API access.

Response headers

All /v1 routes include:
HeaderValue
api-versionv1
deprecatedfalse

Error format

Errors return JSON with message and usually errCode:
StatusMeaning
401Missing/invalid API key, expired key, or banned user
403Plan not eligible, usage limit reached, or feature restricted
404Resource not found (e.g. job ID)
429Rate limit or refresh limit exceeded
500Server error

Supported models

Text and chat endpoints accept model IDs from supported providers:
  • OpenAI: gpt-4o, gpt-4o-mini, gpt-4.1, o1, o3-mini, and related GPT-family IDs
  • Anthropic: Claude models (IDs containing claude)
  • Google: Gemini models (IDs containing gemini)
Pass the same model identifiers you use in the Krastie app.

Quick start

  1. Upgrade to Business or Enterprise.
  2. Log in at app.krastie.ai and generate an API key under account settings.
  3. Run a visibility report:
# Suggest competitors and prompts
curl -X POST https://api.krastie.ai/v1/ai/generate/seo-site-report/prefill \
  -H "Content-Type: application/json" \
  -H "api-key: krastie_YOUR_KEY" \
  -d '{"websiteurl": "https://example.com"}'

# Run the report
curl -X POST https://api.krastie.ai/v1/ai/generate/seo-site-report \
  -H "Content-Type: application/json" \
  -H "api-key: krastie_YOUR_KEY" \
  -d '{
    "websiteurl": "https://example.com",
    "competitors": ["https://competitor.com"],
    "prompts": ["best tools for AI search visibility"]
  }'

# Fetch the latest results
curl https://api.krastie.ai/v1/ai/generate/seo-site-report \
  -H "api-key: krastie_YOUR_KEY"

API sections

AI visibility

Reports, prefill, history, and workspace context.

AI generation

Content generation, SEO scoring, and improvement.

Chat sessions

Assistant with visibility-aware workspace context.

Brand voice

Manage brand voices for consistent content.

Support

Questions about API access, Enterprise limits, or custom integrations: info@krastie.ai