Driving Homotope from an AI agent
Updated on
An agent connected to Homotope’s MCP server (https://homotope.app/mcp) turns an image into a print-ready or cut-ready file in at most 3 jobs: suggest the preset, compute, look at the preview and run the cut check, then correct with the advice the check returns, and stop when the check passes and the zoomed preview no longer shows the defect the user named.
For an agent: the same text as Markdown, /en/agents.md (in French: /agents.md).
JPG · 900 × 640 px
Who this is for
This page is the playbook for an AI agent (Claude Code, Claude, ChatGPT, Gemini CLI, or a script) that uses Homotope through its MCP server at https://homotope.app/mcp. The raw text is at /en/agents.md. Every vectorize_image call is a job counted against the user’s account; every other tool is free. So look before you compute again.
The loop in four steps
- Suggest. Call
suggest_presetwith the image (image_base64,image_urlorsource_job_id). It is free and computes nothing. Or pass"preset":"auto"tovectorize_image. - Compute. Call
vectorize_imagewith that preset. For a sticker, a window sticker or a die-cut print, addcut_contourwith the realwidth_mm(its margins are in mm at that size). It answers at once with ajob_id: pollget_jobuntildone(orfailed). This is the only step that counts. - See and check. Call
get_preview("side":"both"compares with the original;zoomframes a box of the cut check or the part the user complained about), thencheck_cutwith the realwidth_mm(and the printer’ssafety_mmandspacing_mmif they gave them). Readreport.blocking,printer.statusandadvice. - Correct with the advice. Take the first
adviceentry and compute again from the same source (source_job_id: no new upload), then go back to step 3. How to apply each kind of advice is below.
Applying an advice entry
settingis an engine setting (tolerance,smoothing,noise,colors…): pass it inoptionswith itsvalue(or one step in itsdirection), with the concrete preset (preset_suggested.presetfromget_jobif you used"auto", which takes no options).settingiscontour: a number is the newcut_contour.margin_mm, a word is the newcut_contour.mode.settingiswidth_mm: the scale is unknown. Ask the user for the real width and callcheck_cutagain: no new job is needed.settingisnone: nothing in Homotope fixes it (the source, the layout or the printer’s file must change). Tell the user thewhytext and stop computing.
When to stop
- Stop when
check_cutpasses (report.blockingis 0 andprinter.statusisok;warnonly if the user accepts it) AND the zoomedget_previewno longer shows the defect the user named. - At most 3 jobs per image. After the last one, show the best result and the remaining advice instead of computing again.
- Stop at once on an advice with
none, on a 402, or on a 429too_many_variants.
Limits
- Each
vectorize_imageis one job: one of the free plan’s 2 trial jobs of the month (the same as in the web app), then the Pro quota (100 jobs a month), then one credit. A failed job is refunded. - 402
payment_required: the account has no right left. The error carriespurchaseUrl: give it to the user, do not retry, never quote a price (prices are on the Pricing page). - 429
too_many_variants: more than 8 jobs of the same image in a rolling hour.retryAfterSecondssays when; meanwhile, look (get_preview,check_cut) rather than compute. - 429
rate_limited(suggest_preset30 a minute per API key or connection,get_preview30 a minute per account) ortoo_many_jobs(queue full): waitretryAfterSeconds. - The source image is kept 7 days. After that,
source_job_id, thesourceside ofget_previewandsuggest_presetby job answer 410source_expired: ask the user for the image again. get_preview:widthup to 1024 px, 1 Mpx at most;zoomis in image pixels, the frame of thecheck_cutboxes.
What each tool costs the account
vectorize_image: one job (trial, Pro quota or credit).suggest_preset,get_preview,check_cutand itsadvice,read_printer_template: free, nothing written.get_job,get_svg,get_result,list_vectorizations: free; the formats of a finished job come with the job.
Production files and the printer check
get_resultwith"format":"pdf", the realwidth_mm(a 1:1 file, what printers ask for) andbleed_mm(often 2 mm). A job submitted withcut_contourcarries a CutContour spot-colour layer;white_underprintandfinish_layersadd the printer’s white and finishing layers.- DXF for a cutter:
"format":"dxf"(one layer per colour),cut_onlyfor the CutContour alone;layersgives colour separations. - The printer sent a template PDF?
read_printer_template(pdf_urlor base64, free, nothing kept) returns its trim size, bleed and safety zone: copy them intoget_resultaspage_width_mm,page_height_mm,bleed_mmandsafe_mm(same_pages2: front and back,verso_job_id). The user drew their own cut line? Pass it tovectorize_imageascut_contour_image_url(or base64) instead ofcut_contour.get_previewtakeswhite_underprintandfinish_layersto show those layers on the result. - The printer part of
check_cutneedswidth_mm: shapes withinsafety_mmof the cut line (default 3 mm), stickers closer thanspacing_mm(default 4 mm), strokes under 0.25 pt, a single closed CutContour insinglemode. Withoutwidth_mmthese checks are “unavailable”, never passed.
Example: a 140 × 40 cm window sticker
The user wants a window sticker 1,400 mm wide with a cut contour and 2 mm bleed. Two jobs here; a third only if the second check still fails.
suggest_preset {"image_url":"https://…/vitrine.png"}
vectorize_image {"image_url":"https://…/vitrine.png","preset":"auto",
"cut_contour":{"width_mm":1400}}
get_job {"job_id":"<id>"} (until "done")
get_preview {"job_id":"<id>","side":"both","width":1024}
check_cut {"job_id":"<id>","width_mm":1400}
vectorize_image {"source_job_id":"<id>","preset":"<preset_suggested.preset>",
"cut_contour":{"width_mm":1400,"margin_mm":<advice value>}}
check_cut {"job_id":"<id2>","width_mm":1400}
get_result {"job_id":"<id2>","format":"pdf","width_mm":1400,"bleed_mm":2}
Connecting
Claude Code: add the server, then sign in from /mcp (OAuth, the user’s Homotope account). A script uses an API key in the Authorization: Bearer header; never write a key into a prompt, a file or a repository.
claude mcp add --transport http homotope https://homotope.app/mcp
Frequently asked questions
Does an agent see the result?
Yes: get_preview returns a PNG preview of a finished job, the result, the original image or both side by side, with a zoom on a defect. It is free and nothing is counted.
How many jobs does the loop cost?
3 at most per image, often two. Only vectorize_image counts (a trial of the month, the Pro quota or a credit); the suggestion, the preview, the check and the advice are free.
Does Homotope apply a setting on its own?
No. The check returns advice (the setting, the direction, the value); the agent decides whether to compute again, and every job goes through the user’s account.
Can Claude Code follow this playbook?
Yes: connect the MCP server (https://homotope.app/mcp) and give it this text, or its raw Markdown (/en/agents.md).
Are production exports counted?
Through an agent, the formats of a finished job (PDF, DXF, EPS, separations, contour) are included in the job. In the web app: Production exports (DXF, EPS, PDF, separations): 2 free per month with an account, unlimited with Pro; without Pro, 1 credit each beyond those 2.
More guides
- Convert a PNG to SVG, right in your browser
- Convert a JPG to SVG, without the compression artefacts
- Vectorize a logo: from PNG or JPG to a vector file
- Convert an image to DXF for cutting
- Sticker cut contour: the outline around a decal
- A Vectorizer.AI alternative that never asks you to upload the image
- A Vector Magic alternative that traces without uploading the image
- An Illustrator Image Trace alternative, with nothing to install
- An Inkscape Trace Bitmap alternative, right in your browser
- A clean SVG for Cricut and Silhouette Cameo, from any image
- Logo to DXF for laser cutting: from PNG to a ready file
- Turn an image into an SVG for Cricut, step by step
- Prepare a JPG for laser cutting and engraving
- Embroidery: prepare an image before digitizing
- Colour separation for screen printing, from an image
- Connect Homotope to Claude, ChatGPT or Gemini
- The Homotope Figma plugin: your images to SVG, without leaving Figma
- Homotope for production: cutting, screen printing, laser and embroidery
- All questions about vectorizing images