Skip to main content
POST
/
compose
Compose tweet
curl --request POST \
  --url https://xquik.com/api/v1/compose \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "step": "<string>",
  "topic": "<string>",
  "goal": "<string>",
  "styleUsername": "<string>",
  "tone": "<string>",
  "additionalContext": "<string>",
  "callToAction": "<string>",
  "mediaType": "<string>",
  "draft": "<string>",
  "hasLink": true,
  "hasMedia": true
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.xquik.com/llms.txt

Use this file to discover all available pages before exploring further.

Free - does not consume credits
curl -X POST https://xquik.com/api/v1/compose \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "step": "compose",
    "topic": "launching my new SaaS product",
    "goal": "engagement"
  }' | jq

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported.
Content-Type
string
required
Must be application/json.

Body

step
string
required
Workflow step. One of compose, refine, or score.
topic
string
Tweet topic. Used in compose and refine steps.
goal
string
Optimization goal: engagement, followers, authority, or conversation.
styleUsername
string
Cached style username for voice matching. Used in compose step.
tone
string
Desired tone for the tweet. Used in refine step.
additionalContext
string
Extra context or URLs. Used in refine step.
callToAction
string
Desired call to action. Used in refine step.
mediaType
string
Media type: photo, video, or none. Used in refine step.
draft
string
Tweet text to evaluate. Used in score step.
Whether a link is attached. Used in score step.
hasMedia
boolean
Whether media is attached. Used in score step.

Workflow

The compose API follows a 3-step workflow:
  1. compose: Returns algorithm weights, content rules, penalties, and follow-up questions
  2. refine: Returns composition guidance, example patterns, media strategy, and CTA advice
  3. score: Evaluates a draft against algorithm checks with pass/fail results

Response

contentRules
object[]
Algorithm content rules. Each item has a rule string.
scorerWeights
object[]
Algorithm scorer weights. Each item has context, signal, and weight fields.
followUpQuestions
string[]
Follow-up questions to refine the composition.
engagementMultipliers
object[]
Engagement multipliers. Each item has action and multiplier fields.
engagementVelocity
string
Engagement velocity description.
intentUrl
string
X intent URL for posting the tweet.
nextStep
string
Instructions for the next API call in the workflow.
savedStyles
object[]
Saved style profiles. Present when you omit styleUsername and cached styles exist.
savedStyles[].username
string
Cached style username.
savedStyles[].tweetCount
number
Number of cached tweets available for that style.
source
string
Algorithm source attribution.
styleNote
string
Style fallback note. Present when a requested style is not cached and the request can continue without refreshing it.
styleTweets
string[]
Cached example tweets used for voice matching. Present when styleUsername matches a cached style.
topPenalties
string[]
Top algorithm penalties to avoid.
{
  "contentRules": [{ "rule": "Keep under 280 characters" }, { "rule": "Front-load the hook" }],
  "scorerWeights": [{ "context": "tweet", "signal": "hook", "weight": 2 }],
  "engagementMultipliers": [{ "action": "reply", "multiplier": "1.5x" }],
  "engagementVelocity": "First 30 minutes are critical for algorithmic reach",
  "topPenalties": ["External links reduce reach by ~50%"],
  "followUpQuestions": [
    "What tone do you want? (casual, professional, bold)",
    "Will you attach media (photo, video, none)?",
    "What call-to-action do you prefer?"
  ],
  "intentUrl": "https://x.com/intent/tweet?text=...",
  "nextStep": "Call with step: refine, providing tone, goal, and topic",
  "source": "X algorithm analysis"
}
Next steps: Save Draft to save a composed tweet for later, or Analyze Style to match another account’s voice.
Last modified on May 9, 2026