Style

API name: style_agent · Category: Brand

Check content against the organization’s style guide in one pass. For what this agent does and why it matters, see Style in the Agent Catalog.

What it returns

The run status plus each flagged issue with its location, category, explanation, and one-click suggested correction, and per-goal quality scores.

The Style agent also has a dedicated API surface with configuration, targets, content profiles, and reporting — see the Style Agent section of the API reference (POST /style-agent/run and POST /style-agent/run-file).

Run this agent

Agents are run by ID, but you never need to hardcode one: resolve the ID from the agent’s stable name (style_agent) with GET /agents, then call POST /agents/{agent_id}/run. Pass wait=true to block until the run completes; omit it to get a workflow_id back immediately and track the run with GET /agents/workflows/{workflow_id} (or a webhook_url in the request body).

TOKEN="YOUR_TOKEN"
# Resolve the agent ID by name
AGENT_ID=$(curl -s "https://api.markup.ai/agents?page_size=100" \
-H "Authorization: Bearer $TOKEN" \
| jq -r '.agents[] | select(.name == "style_agent") | .id')
# Run the agent and wait for the result
curl -X POST "https://api.markup.ai/agents/$AGENT_ID/run?wait=true" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"text": "Your content to check."}'

Check a file

To check a document instead of a string, post it to POST /style-agent/run-file as multipart/form-data. PDF, Word (.docx), HTML, DITA, Markdown, and plain text are accepted, up to 7 MB. The file is forwarded unchanged and the text is extracted server side, so the check runs against the document as submitted — you do not need to convert it first.

cURL
curl -X POST "https://api.markup.ai/style-agent/run-file?wait=true" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file_upload=@/path/to/your/file.pdf"

file_upload is the only required field; style_guide_id, content_profile_id, document_ref, document_name, and domain_ids are the same options POST /style-agent/run takes, passed as form fields rather than JSON. See the API reference for the full parameter list and Python and TypeScript samples.

A large file can take longer than the synchronous request window, so prefer omitting wait=true for those: the request returns a workflow_id immediately, which you poll with GET /style-agent/workflows/{workflow_id} until status leaves running.

Each issue’s position (start and end) indexes the text the service extracted, not the bytes you uploaded — the offsets will not line up with your source file. Use position.text for the flagged span, or context_surface for the surrounding text, to locate it in the original document.

File uploads are specific to this endpoint. The generic POST /agents/{agent_id}/run route, including multi-agent runs, remains text only.

Prefer MCP? On the hosted MCP server, run this agent with markupai_run_agents and agents: ["style_agent"], or let markupai_review select it from your goal — see the MCP overview.