Post process: ops -> one pinned, byte-deterministic G-code program (C22.7)
curl --request POST \
--url https://api.eddy.engineer/v1/cam.post \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"feed": 123,
"ops": [
{
"name": "<string>",
"op": "drill",
"tool_dia": 123,
"peck": 123
}
],
"recipe": {},
"rpm": 123,
"dialect": "fanuc-s1",
"margin": 0
}
'import requests
url = "https://api.eddy.engineer/v1/cam.post"
payload = {
"feed": 123,
"ops": [
{
"name": "<string>",
"op": "drill",
"tool_dia": 123,
"peck": 123
}
],
"recipe": {},
"rpm": 123,
"dialect": "fanuc-s1",
"margin": 0
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
feed: 123,
ops: [{name: '<string>', op: 'drill', tool_dia: 123, peck: 123}],
recipe: {},
rpm: 123,
dialect: 'fanuc-s1',
margin: 0
})
};
fetch('https://api.eddy.engineer/v1/cam.post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/cam.post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feed' => 123,
'ops' => [
[
'name' => '<string>',
'op' => 'drill',
'tool_dia' => 123,
'peck' => 123
]
],
'recipe' => [
],
'rpm' => 123,
'dialect' => 'fanuc-s1',
'margin' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/cam.post"
payload := strings.NewReader("{\n \"feed\": 123,\n \"ops\": [\n {\n \"name\": \"<string>\",\n \"op\": \"drill\",\n \"tool_dia\": 123,\n \"peck\": 123\n }\n ],\n \"recipe\": {},\n \"rpm\": 123,\n \"dialect\": \"fanuc-s1\",\n \"margin\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/cam.post")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"feed\": 123,\n \"ops\": [\n {\n \"name\": \"<string>\",\n \"op\": \"drill\",\n \"tool_dia\": 123,\n \"peck\": 123\n }\n ],\n \"recipe\": {},\n \"rpm\": 123,\n \"dialect\": \"fanuc-s1\",\n \"margin\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/cam.post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feed\": 123,\n \"ops\": [\n {\n \"name\": \"<string>\",\n \"op\": \"drill\",\n \"tool_dia\": 123,\n \"peck\": 123\n }\n ],\n \"recipe\": {},\n \"rpm\": 123,\n \"dialect\": \"fanuc-s1\",\n \"margin\": 0\n}"
response = http.request(request)
puts response.read_body<string>{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}CAM
Post process: ops -> one pinned, byte-deterministic G-code program (C22.7)
Every op’s toolpath is generated and posted through a pinned dialect (fanuc-s1: one fixture test per block type) into one program returned as a download body — the DXF writer’s image. Same request -> same bytes. Unknown dialects refuse typed.
POST
/
v1
/
cam.post
Post process: ops -> one pinned, byte-deterministic G-code program (C22.7)
curl --request POST \
--url https://api.eddy.engineer/v1/cam.post \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"feed": 123,
"ops": [
{
"name": "<string>",
"op": "drill",
"tool_dia": 123,
"peck": 123
}
],
"recipe": {},
"rpm": 123,
"dialect": "fanuc-s1",
"margin": 0
}
'import requests
url = "https://api.eddy.engineer/v1/cam.post"
payload = {
"feed": 123,
"ops": [
{
"name": "<string>",
"op": "drill",
"tool_dia": 123,
"peck": 123
}
],
"recipe": {},
"rpm": 123,
"dialect": "fanuc-s1",
"margin": 0
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
feed: 123,
ops: [{name: '<string>', op: 'drill', tool_dia: 123, peck: 123}],
recipe: {},
rpm: 123,
dialect: 'fanuc-s1',
margin: 0
})
};
fetch('https://api.eddy.engineer/v1/cam.post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/cam.post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feed' => 123,
'ops' => [
[
'name' => '<string>',
'op' => 'drill',
'tool_dia' => 123,
'peck' => 123
]
],
'recipe' => [
],
'rpm' => 123,
'dialect' => 'fanuc-s1',
'margin' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/cam.post"
payload := strings.NewReader("{\n \"feed\": 123,\n \"ops\": [\n {\n \"name\": \"<string>\",\n \"op\": \"drill\",\n \"tool_dia\": 123,\n \"peck\": 123\n }\n ],\n \"recipe\": {},\n \"rpm\": 123,\n \"dialect\": \"fanuc-s1\",\n \"margin\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/cam.post")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"feed\": 123,\n \"ops\": [\n {\n \"name\": \"<string>\",\n \"op\": \"drill\",\n \"tool_dia\": 123,\n \"peck\": 123\n }\n ],\n \"recipe\": {},\n \"rpm\": 123,\n \"dialect\": \"fanuc-s1\",\n \"margin\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/cam.post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feed\": 123,\n \"ops\": [\n {\n \"name\": \"<string>\",\n \"op\": \"drill\",\n \"tool_dia\": 123,\n \"peck\": 123\n }\n ],\n \"recipe\": {},\n \"rpm\": 123,\n \"dialect\": \"fanuc-s1\",\n \"margin\": 0\n}"
response = http.request(request)
puts response.read_body<string>{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
application/json
Response
G-code program (program.nc)
The response is of type string.