Everything the interface does is available over the API: upload the file, start generation, poll the status, download the G-code. Four calls, no account, no registration — the access token from your credit purchase is the API key.
Built for repeating work: part families with changing dimensions, batches out of a configurator, overnight runs. If you would rather have an AI assistant operate it, use the MCP server, which sits on this same interface.
Credits and the access token are available at www.step2gcode.com — no account, no subscription.
The request object is nested: file_id sits at the top level, everything else lives in blocks. Every block is optional — whatever you leave out keeps its default. Unknown fields are dropped silently, so a typo in a field name does not come back as an error; it comes back as a result that does not match what you asked for.
(top level)file_id | string, required | The id returned by POST /api/upload. | |
nest_uniform_depth | bool | false | Only when arranging several parts on one sheet: forces one cutting depth for all of them. Without it, STEP parts keep the depth from their 3D geometry while DXF and SVG parts use depth_override. |
tool — Cutterbit_diameter | number, mm | 6.0 | Cutter diameter. It has to fit the smallest inner radius of the part. |
cutting_length | number, mm | empty | Usable flute length. When set, the depth per pass never exceeds it. |
tool_type | 'endmill' | 'vbit' | 'endmill' | End mill or V-bit. For laser jobs set laser.enabled instead. |
vbit_angle | number, degrees | 90 | Included angle of the V-bit. Only used with tool_type "vbit". |
vbit_tip_diameter | number, mm | 0 | Diameter of the flattened tip. 0 means pointed, no compensation. |
spindle_speed | integer, rpm | 10000 | Spindle speed. Overridden by feed_rates when that block is sent. |
horizontal_speed | number, mm/min | 1200 | Feed in the plane. Also overridden by feed_rates. |
vertical_speed | number, mm/min | 300 | Plunge feed. Also overridden by feed_rates. |
feed_rates — Cutting dataWhen this block is present, its values replace the three speeds from tool. Important for scripts: there is no server-side material automation — the cutting data you send is used exactly as sent.
auto_calculate | bool | true | Comes from the interface, where it drives the material preset. Over the API the field has no effect; set it to false for clarity when you send your own values. |
spindle_speed | integer, rpm | 18000 | Spindle speed. |
horizontal_speed | number, mm/min | 1200 | Feed in the plane. |
vertical_speed | number, mm/min | 400 | Plunge feed. |
material — Workpiece materialtype | string | 'wood' | Material, for example wood, hardwood, plywood, acrylic, aluminum, steel, brass. It only decides from which diameter holes are helically milled rather than drilled — spindle speed and feeds come from tool or feed_rates. |
depth — Depthdepth_override | number, mm | empty = AUTO | Cutting depth. Empty means: derive it from the geometry (for STEP, the part height). DXF and SVG carry nothing to derive it from, so there the value is effectively required. |
step_down | number, mm | empty = AUTO | Depth per pass. Note: while settings.optimize_passes is true, the value is only an upper bound and the actual step-down is optimised below it. For an exact step-down, set optimize_passes to false. |
final_depth_offset | number, mm | 0.1 | How far the last pass goes below the underside of the part so a cut-out is severed cleanly. |
origin — Origin and orientationThe short spelling xy and z is accepted as well and means the same as origin_xy and origin_z.
origin_xy | 'TL' | 'TR' | 'BL' | 'BR' | 'C' | 'TL' | Origin in the plane: top left, top right, bottom left, bottom right or centre. |
origin_z | 'top' | 'spoilboard' | 'top' | Z zero on the stock surface or on the spoilboard. |
rotation_z | number, degrees | 0 | Rotates the part in the plane, for instance to lay it out better on the sheet. |
rotation_x | number, degrees | 0 | Tilts the model around X, for parts that are not lying flat in CAD. |
rotation_y | number, degrees | 0 | Tilts the model around Y. |
work_coordinate_system | 'G54' … 'G59' | 'G54' | Work coordinate system selected in the program. |
operations — Operationscontour | bool | true | Cut the outer contour. |
inner_contour | bool | true | Inner contours and cut-outs that are not round holes. |
holes | bool | true | Round holes. |
pockets | bool | true | Pockets. The depth information for them lives in the STEP geometry; DXF and SVG do not carry it. |
pocket_step_over | integer, % | 50 | Overlap between clearing passes. |
pocket_start_at | 'Edge' | 'Center' | 'Edge' | Clear from the outside in, or from the inside out. |
dogbone | bool | false | Dogbone corners so square counterparts fit into inside corners. |
ramp_entry | bool | true | Enter on a ramp instead of plunging straight down. |
cylindrical_hole_mode | 'auto' | 'helix' | 'normal' | 'auto' | How round holes are made: helical milling, drilling, or decided automatically from diameter and material. |
order | list of strings | empty | Custom operation order, e.g. ["facing","pockets","holes","inner","contour","other"]. Empty means the internal default order. |
settings — Job behaviourholding_tabs | bool | true | Master switch for holding tabs. Their geometry lives in tags. |
holding_tabs_outer | bool | true | Tabs on the outer contour. |
holding_tabs_inner | bool | true | Tabs on inner contours. |
ramp_entry | bool | true | Ramp entry, as in operations. |
dogbone | bool | false | Dogbone corners, as in operations. |
optimize_passes | bool | true | Distributes the depth over even passes on its own and treats depth.step_down as an upper bound only. Set it to false when the step-down has to be honoured exactly. |
tags — Holding tabsOnly takes effect when tabs are enabled through settings.holding_tabs. Empty dimensions mean AUTO: derived from part size and cutter diameter.
enabled | bool | false | Create tabs. |
width | number, mm | empty = AUTO | Width of one tab. |
height | number, mm | empty = AUTO | Height of one tab, usually a fraction of the cutting depth. |
length | number, mm | empty = AUTO | Length of one tab along the contour. |
angle | number, degrees | 45 | Flank angle of the tabs. |
spacing | number, mm | empty = AUTO | Distance between two tabs along the contour. |
facing — Facingenabled | bool | false | Face the surface before machining. |
depth | number, mm | 0.5 | Layer to be removed. |
step_over | integer, % | 50 | Path overlap. |
pattern | 'ZigZag' | 'Offset' | 'ZigZag' | Path pattern. |
zigzag_angle | number, degrees | 0 | Direction of the zigzag passes. |
add_to_depth | bool | true | true: the faced layer is added to the stock thickness. false: it is subtracted from the cutting depth. |
extension | number, mm | empty = half the cutter | Overshoot beyond the workpiece edge. 0 turns the overshoot off. |
chamfer — Chamfer, engraving and 2D direct modeenabled | bool | false | Run a chamfer with the V-bit. |
depth | number, mm | 2.0 | Depth of the chamfer. |
hole_depth | number, mm | empty | Different chamfer depth at holes. Empty means: same as depth. |
engraving | bool | false | Engraving mode: follows the contour without cutter radius compensation, even with a flattened tip. |
dxf_direct | bool | false | 2D direct mode: G-code straight from the DXF paths, without going through an extrusion. |
controller_compensation | bool | false | Leave radius compensation to the controller (G41/G42) instead of baking it into the path. |
vshape_adaptive — V-carvingenabled | bool | false | V-carving with adaptive depth instead of a constant chamfer depth. |
max_depth | number, mm | 0 = unlimited | Upper bound for the carving depth. |
depth_step | number, mm | 0.5 | Depth increment per pass. |
nesting_mode | 'inner' | 'outer' | 'inner' | Contour selection: carve inside the inner contours, or clear the outer areas and leave holes out. Not to be confused with arranging several parts. |
laser — Laserenabled | bool | false | Laser job instead of a milling job. |
power | number, % | 100 | Power. |
speed | number, mm/min | 1000 | Speed. |
passes | integer | 1 | Number of passes. |
mode | 'cut' | 'engrave' | 'cut' | Cutting or engraving. |
kerf | number, mm | 0 | Kerf width the path is offset by. |
kerf_enabled | bool | false | Switches the compensation on. Without this flag kerf has no effect. |
nesting | 'all' | 'outer' | 'inner' | 'all' | Contour selection: all contours, outer only, or inner only. |
postprocessor — Output formatGET /api/postprocessors returns the full list of names.
name | string | 'grbl_post' | Controller dialect, e.g. grbl_post, linuxcnc_post, mach3_mach4_post, uccnc_post, marlin_post, fanuc_post, heidenhain_post, estlcam_post. |
custom_preamble | string | empty | Your own G-code lines before all operations. |
custom_postamble | string | empty | Your own G-code lines after all operations. |
The generated G-code is a machine-produced proposal. Verify tool paths, depths of cut, feed rates and clearances before every run, and do an air pass without a workpiece when in doubt. Uploaded files are deleted after 24 hours at the latest.
With the access token from your credit purchase, as the header Authorization: Bearer YOUR-TOKEN. If that header is already taken — behind some corporate proxies or an upstream basic auth — use X-Api-Token: YOUR-TOKEN instead. Both are equivalent.
Upload and generation still work; the download responds with status 402 and the reason no_credits. An invalid token is rejected at upload time with 401 and invalid_token.
The same ones the interface offers, as a nested object. Every field with its type, default and effect is listed above under "Every parameter of POST /api/generate" — each block is optional, whatever you leave out keeps its default. Three traps are worth knowing: depth.step_down only acts as an upper bound while settings.optimize_passes is true; laser.kerf additionally needs kerf_enabled; and a material name sets no cutting data, that comes from tool or feed_rates.
Yes, a rate limit per IP address so the service stays available for everyone. A valid access token raises the limit. Bulk requests without a token are not permitted under the terms of service.
Uploaded files and results are deleted after 24 hours at the latest, and a service restart can invalidate job ids earlier. So download the G-code promptly.
Then use the MCP server: it sits on this same interface and turns it into tools for Claude, ChatGPT, the Gemini CLI and other clients.