Free — does not consume credits
This endpoint is free and does not consume usage. No subscription required.
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
Your API key. Session cookie authentication is also supported.
Must be application/json.
Body
Workflow step. One of compose, refine, or score.
Tweet topic. Used in compose and refine steps.
Optimization goal: engagement, followers, authority, or conversation.
Cached style username for voice matching. Used in compose step.
Desired tone for the tweet. Used in refine step.
Extra context or URLs. Used in refine step.
Desired call to action. Used in refine step.
Media type: photo, video, or none. Used in refine step.
Tweet text to evaluate. Used in score step.
Whether a link is attached. Used in score step.
Whether media is attached. Used in score step.
Workflow
The compose API follows a 3-step workflow:
compose : Returns algorithm weights, content rules, penalties, and follow-up questions
refine : Returns composition guidance, example patterns, media strategy, and CTA advice
score : Evaluates a draft against algorithm checks with pass/fail results
Response
200 OK (compose)
200 OK (refine)
200 OK (score)
400 Invalid Input
401 Unauthenticated
Algorithm content rules. Each item has a rule string.
Algorithm scorer weights. Each item has context, signal, and weight fields.
Follow-up questions to refine the composition.
Engagement multipliers. Each item has action and multiplier fields.
Engagement velocity description.
X intent URL for posting the tweet.
Instructions for the next API call in the workflow.
Algorithm source attribution.
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"
}
Composition guidance tips.
Example tweet patterns. Each item has pattern and description fields.
X intent URL for posting the tweet.
Instructions for the next API call in the workflow.
{
"compositionGuidance" : [
"Lead with a personal story or metric." ,
"End with an open question."
],
"examplePatterns" : [
{ "pattern" : "Hook -> Context -> CTA" , "description" : "Surprising metric, 1-2 sentences, open question" }
],
"intentUrl" : "https://x.com/intent/tweet?text=..." ,
"nextStep" : "Write your draft and call with step: score"
}
Total number of algorithm checks evaluated.
Number of checks that passed.
Overall pass/fail result.
Top improvement suggestion.
Individual check results. Whether this check passed.
Improvement suggestion. Omitted if passed.
Instructions for next steps.
X intent URL. Present only when all checks pass.
{
"totalChecks" : 11 ,
"passedCount" : 9 ,
"passed" : false ,
"topSuggestion" : "Add a specific detail or metric to the first line." ,
"checklist" : [
{ "factor" : "No external links in body" , "passed" : true },
{ "factor" : "No hashtags" , "passed" : true },
{ "factor" : "No excessive capitalization" , "passed" : true },
{ "factor" : "Conversation-driving CTA" , "passed" : true },
{ "factor" : "Optimal length (50-280 characters)" , "passed" : true },
{ "factor" : "Media attached" , "passed" : true },
{ "factor" : "No excessive punctuation" , "passed" : true },
{ "factor" : "No emojis" , "passed" : true },
{ "factor" : "No em dashes or double dashes" , "passed" : true },
{ "factor" : "Sufficient substance" , "passed" : false , "suggestion" : "Add a specific detail or metric" },
{ "factor" : "Link-in-reply strategy" , "passed" : false , "suggestion" : "Move the link to a reply instead" }
],
"nextStep" : "Revise your draft and score again"
}
{ "error" : "invalid_input" , "message" : "step is required. Must be \" compose \" , \" refine \" , or \" score \" ." }
{ "error" : "unauthenticated" }
Missing or invalid API key.