ghost.writer

API, MCP and CLI

Everything in the app is available over HTTP, as MCP tools and from the terminal. Auth is one account key, gw_…, sent as Authorization: Bearer.

Get a key

In the app: Account → API keys. Or make a free trial account from code:

curl -s -X POST https://ghost.writer.pit.world/api/v1/signup -H 'content-type: application/json' -d '{"cookie":false}'

Write an article

curl -s -X POST https://ghost.writer.pit.world/api/v1/articles \
  -H "authorization: Bearer $GW_KEY" -H 'content-type: application/json' \
  -d '{"keyword":"how to descale an espresso machine","type":"howto","length":"medium","tone":"friendly","language":"English"}'

It answers at once with the article and state: "queued". Poll GET /api/v1/articles/:id until state is done (or failed, which refunds every word). step and progress say what it is doing. A medium article takes a few minutes.

FieldValues
keywordrequired
typeblog listicle howto comparison review roundup explainer local
length / wordsshort ~800, medium ~1,500, long ~2,500, epic ~4,000; or words 300-6000
tonefriendly professional conversational authoritative witty persuasive academic casual or your own
povsecond first-plural first third
language, audience, title, instructionsfree text
secondaryarray of secondary keywords
brand_idwrite for a brand (voice, offers, internal links)
faq, takeaways, sources, research, internal_linksbooleans, all on by default

Endpoints

GET /api/v1/mebalance, keys, recent charges, packs
GET /api/v1/articles · POST · GET/PATCH/DELETE /:idarticles; PATCH title, meta_description, slug, markdown (rescored, free)
GET /api/v1/articles/:id/export?format=md|html|jsondownload
POST /api/v1/articles/:id/publish{"integration_id":"…","status":"draft|publish"}
POST /api/v1/research{"keyword":"…"} what ranks, headings, shared terms, questions (free)
POST /api/v1/seo-scorescore any Markdown (free, no key needed)
POST /api/v1/ideas · /rewritejobs: poll GET /api/v1/jobs/:id
/api/v1/brands · POST /brands/importbrand profiles; import drafts one from a URL (job)
/api/v1/integrationsWordPress {kind,site,username,app_password}, Ghost {kind,site,admin_key}, webhook {kind,url}
/api/v1/chats · POST /chats/:id/messages{"content":"…","research":true} (job)
POST /api/v1/topup{"pack":"starter|writer|studio|agency"} → CoinPay checkout URL

Webhook publishing

A webhook integration receives POST JSON (title, slug, meta_description, keyword, markdown, html, words, seo_score) with header x-ghostwriter-signature: t=<unix>,v1=<hex>, where v1 = HMAC-SHA256(secret, t + "." + body). Answer with JSON {"url":"…"} to link the published page.

MCP

Streamable HTTP at https://ghost.writer.pit.world/mcp with your key as the Bearer token. Tools: account write_article article_status get_article list_articles update_article export_article seo_score research_keyword article_ideas rewrite job_status list_brands create_brand import_brand update_brand list_integrations publish_article.

claude mcp add --transport http ghost-writer https://ghost.writer.pit.world/mcp --header "Authorization: Bearer $GW_KEY"

CLI and terminal UI

curl -fsSL https://ghost.writer.pit.world/install.sh | sh
ghostwriter login            # device sign-in in your browser
ghostwriter                  # terminal UI
ghostwriter write "best trail running shoes" --type roundup --length long
ghostwriter ls
ghostwriter get <id> > article.md
ghostwriter publish <id> --to <integration-id> --status draft
ghostwriter balance

v0.1.2 · llms.txt