POST https://xquik.com/api/v1/compose
Free. This endpoint does not consume credits.
xai-org/x-algorithm.
It never returns finished Tweet text. It never publishes a post. It never
predicts likes, replies, reposts, bookmarks, profile visits, or follower growth.
Use 3 Compose calls for one complete writing cycle.
Workflow
- Call
composewith a topic. - Answer its 4 questions.
- Call
refinewith the topic, goal, and tone. - Write the draft. Call
scorewith its full text.
Choose the correct tweet writing step
Each call returns only its step-specific shape. Do not deserialize every result
into one generic response type.
Match the goal to your tweet intent
Thegoal selects one question and matching source guidance.compose defaults to engagement when you omit goal. Send a documented
goal when later steps depend on it.Requests
- 1. Compose
- 2. Refine
- 3. Score
Returns 10 source facts and 4 follow-up questions.
step and topic are required.These fields are optional.goaltakesengagement,followers,authority, orconversation. Defaults toengagement.styleUsernamenames an analyzed X (Twitter) username or saved custom style label.
Refine request context
Thetone field accepts any non-empty string. The response keeps the
requested tone, topic, goal, media, action, and additional context. It then
adds source-backed viewer-action guidance. It does not invent style rules.Headers
Sendx-api-key with an Xquik API key. OAuth clients can send a bearer token
through the Authorization header instead.Body
The API ignores unknown body fields. Send only the fields for the selected step.
Response
200 OK
The response shape matches the requested workflow step.Compose response
Match a saved Twitter writing style
styleUsername searches only styles owned by the authenticated account.
Xquik lowercases the lookup value before searching.The 200 fallback still returns the complete Compose response. The 400 branch
returns only the documented error object. Analyze the username first when the
account can run a new style analysis.
Refine response
Score response
This step runs one deterministic input check. It checks that the draft contains text. It does not score quality or predict ranking.intentUrl appears only when the draft contains text.Errors
- 400 Invalid input
- 401 Unauthenticated
- 429 Rate limited
invalid_input.Tweet composer questions
What does the tweet composer generate?
It returns source facts, 4 questions, request context, and one input check. You write the draft betweenrefine and score.Is this endpoint a tweet generator?
No. A Tweet generator usually writes final post text from one prompt. This endpoint guides a 3-step writing workflow. It helps plan, refine, and check one draft without publishing it.How does it help write a good tweet?
Choose a goal before drafting. Answer the 4 questions. Add verified context when needed. Treat source signals as viewer-specific, not universal advice.Can it supply current Twitter post ideas?
No.radarRecommendations remains an empty compatibility field. Supply
verified facts through additionalContext during Refine.Can it match a saved Twitter writing style?
Yes. Send an analyzed username or custom style label instyleUsername. A
successful match returns cached styleTweets. Use those samples to study
sentence length, vocabulary, openings, and calls to action.
The endpoint does not rewrite the draft. It also doesn’t verify
that one style belongs to a public X (Twitter) username.What happens when a draft check fails?
passed becomes false for a blank draft. The checklist suggests adding text.
intentUrl stays absent until the draft contains text.Does the score predict likes, replies, or reposts?
No. It never predicts likes, replies, reposts, bookmarks, profile visits, or follower growth. Ranking stays viewer-specific.Can the endpoint publish the draft?
No. Use Create Tweet after review. You can also openintentUrl after the input check passes.Research current context with Radar. Save accepted
text with Create Draft. Analyze a reference
voice with Analyze Style.
Response examples
200 example
- 400
{ "error": "invalid_input", "message": "Invalid input. Check the request body." } - 401
{ "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." } - 403
{ "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." } - 429
{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }