Introducing our new Monitoring feature Learn more

Documentation

Quickstart

Generate your first piece of content with the Krastie API in a few minutes.

Quickstart

This guide walks through your first authenticated call to generate text.

1. Get an API key

In the Krastie app, open Integrations → Krastie API and generate a key. Copy the full krastie_… value.

2. Send a request

curl https://api.krastie.ai/v1/ai/generate/text \
  -H "api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "text": "Write a two-sentence intro for an AI visibility platform."
  }'

Request body

FieldTypeRequiredDescription
modelstringYesModel identifier (for example gpt-4o)
textstringYesPrompt / instructions
useWorkerbooleanNoIf true, queues the job and returns 202 with a jobId
optionsobjectNoExtra options passed to the worker when useWorker is true
jobTypestringNoWorker job name (default ai_tool_content)

3. Handle the response

Synchronous (default): the response body contains the generated content from the model pipeline.

Queued (useWorker: true):

{
  "message": "Content generation queued",
  "jobId": "123"
}

Poll the job until it completes:

curl https://api.krastie.ai/v1/ai/generate/job/123 \
  -H "api-key: YOUR_KEY"

See Async jobs for the full job status payload.

Next steps

  • Explore Generate for images, brand voice, and SEO endpoints
  • Manage Chat sessions
  • Track referrals with AI traffic