# Reimagix agent guide
Base URL: http://localhost:3246/v1
OpenAPI: http://localhost:3246/openapi.json
Create a named API key with a finite credit budget at https://reimagix.com/dashboard/api-keys. An active, verified account is required. Use Authorization: Bearer <key>, supplied through your secure credential store. Never ask users to paste credentials into chat or put credentials in URLs.

1. GET /capabilities for formats, available modes, fonts and input schemas; GET /account for credits and remaining key budget.
2. GET /style-kits. Reuse a suitable kit or POST /style-kits with name, primary_color, secondary_color and optional heading_font/body_font from capabilities. Existing account kit limits apply. Optional logo_asset_id references an owned uploaded image.
3. POST /assets with multipart image, or POST /assets/import with {"url":"https://...","name":"Photo"}. URLs must be reachable HTTPS images, not private/local hosts or authenticated pages. Imports copy bytes to account storage. Reuse asset IDs; never invent them.
4. POST /quotes with output_type, style_kit_id, formats and optional variations_count/design_seed. Image uses image:{title,body,pre_header,cta,offer,features,photo:{asset_id}}. Carousel/video use sequence:{target_count:5 or 7,title,body,closing,photos:[{asset_id}]}. Preserve supplied photo/text order. Never claim Reimagix writes copy or generates photos. The external agent supplies content authorized by its user.
5. Check total_cost against the user's spending instructions. A quote expires after ten minutes and is not a reservation. POST /jobs with {"quote_id":"..."} and a stable Idempotency-Key (16-80 letters/numbers/dashes/underscores). Do not create a fresh key after a timeout: retry the exact request. A conflicting request returns 409. Credits and key allowance are reserved once.
6. Follow status_url. Poll after five seconds, back off to thirty seconds and obey Retry-After. A 202 is acceptance, not a finished result. A failed job can still contain successful downloads; only failed outputs are refunded.
7. Download artifacts through their authenticated URLs. For presentation to a user who cannot send API headers, POST /artifacts/{id}/share to obtain a one-hour link. Anyone holding that link can access that artifact until expiry. Never expose storage keys or API keys.
8. Retain results unless the user requests deletion. DELETE /jobs/{id} removes terminal outputs only. Revoking a key prevents new access but does not cancel accepted work. Existing share links expire on their own or stop working when the output is deleted.

Errors contain error.code, error.message, optional error.details and request_id. 401: replace/reconnect credentials. 402: account credits or key budget exhausted; do not purchase or raise budgets automatically. 409: obtain a fresh quote only for a new request, or wait before deleting active work. 422: fix the supplied field errors. 429: honor Retry-After. 503: feature unavailable; do not claim completion.
No MCP connection, automatic publishing, audio or video uploads are offered by this API version.
