---
title: "Compose, refine, or score a tweet"
method: POST
path: "/compose"
tags: ["Composition"]
---

# Compose, refine, or score a tweet

`POST /compose`

## Request body

- object
  - `step` 'compose' | 'refine' | 'score', required — Workflow step
  - `topic` string — Tweet topic (compose, refine)
  - `goal` 'engagement' | 'followers' | 'authority' | 'conversation' — Optimization goal
  - `draft` string — Tweet draft text to evaluate (score)
  - `tone` string — Desired tone (refine)
  - `styleUsername` string — Cached style username for voice matching (compose)
  - `additionalContext` string — Extra context or URLs (refine)
  - `callToAction` string — Desired call to action (refine)
  - `mediaType` 'photo' | 'video' | 'none' — Media type (refine)
  - `hasLink` boolean — Whether a link is attached (score)
  - `hasMedia` boolean — Whether media is attached (score)

## Response `200`

Composition result

- object

## Other responses

- `400` — Invalid input
- `401` — Unauthenticated

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xquik-dev/xquik-api/revisions/2e39c853db18/schema)
