A .kicad_sch / .kicad_pcb / project JSON / Gerber / Excellon text or an ODB++ job into the document (E7.11 + E7.13 CAM + IG26)
curl --request POST \
--url https://api.eddy.engineer/v1/eda.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"format": "<string>",
"blob": "<string>",
"bytes_base64": "<string>",
"document": {},
"layer": "<string>",
"layer_map": {},
"sheet": "<string>",
"step": "<string>",
"text": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/eda.import"
payload = {
"format": "<string>",
"blob": "<string>",
"bytes_base64": "<string>",
"document": {},
"layer": "<string>",
"layer_map": {},
"sheet": "<string>",
"step": "<string>",
"text": "<string>"
}
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({
format: '<string>',
blob: '<string>',
bytes_base64: '<string>',
document: {},
layer: '<string>',
layer_map: {},
sheet: '<string>',
step: '<string>',
text: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/eda.import', 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/eda.import",
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([
'format' => '<string>',
'blob' => '<string>',
'bytes_base64' => '<string>',
'document' => [
],
'layer' => '<string>',
'layer_map' => [
],
'sheet' => '<string>',
'step' => '<string>',
'text' => '<string>'
]),
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/eda.import"
payload := strings.NewReader("{\n \"format\": \"<string>\",\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"document\": {},\n \"layer\": \"<string>\",\n \"layer_map\": {},\n \"sheet\": \"<string>\",\n \"step\": \"<string>\",\n \"text\": \"<string>\"\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/eda.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"format\": \"<string>\",\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"document\": {},\n \"layer\": \"<string>\",\n \"layer_map\": {},\n \"sheet\": \"<string>\",\n \"step\": \"<string>\",\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/eda.import")
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 \"format\": \"<string>\",\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"document\": {},\n \"layer\": \"<string>\",\n \"layer_map\": {},\n \"sheet\": \"<string>\",\n \"step\": \"<string>\",\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"document": {},
"document_hash": "<string>",
"format": "<string>",
"report": {}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Circuits (EDA)
A .kicad_sch / .kicad_pcb / project JSON / Gerber / Excellon text or an ODB++ job into the document (E7.11 + E7.13 CAM + IG26)
format = kicad_sch (fills `sheet`, default the root: symbols by lib id — the seed’s KiCad ids, the page’s wider map, Superstring:<kind> — wires, junctions, labels, hierarchical labels as ports, buses, text; unmapped kinds and tags are typed skips in `report.skipped`) | kicad_pcb (footprints by name or pad count, segments on the stack’s copper layers, vias, the Edge.Cuts outline or polygon) | json | gerber (E7.13 CAM: an RS-274X layer onto `layer`, default the file’s .FileFunction — flashes become free pads, draws tracks, the profile the board shape and its cutouts, legend draws lines, regions fills; .N / .C / .P object attributes ride on as nets and component pins; arcs, macro / polygon apertures, clear polarity and step-and-repeat are typed skips) | excellon (a drill file: a hit on a flash gives the pad its hole, a hit on nothing is a plain hole; zero-suppressed integers need the ;FILE_FORMAT comment). Own dialects round-trip to the byte fixed point — `gerber(import(gerber(doc)))` is the writer’s bytes; a structural failure refuses (400) with the document untouched. format = odbpp (IG26) takes `bytes_base64` instead of `text`: a job as a zip, tar or gzipped tar, with per-file .gz and .Z inside. The matrix's copper rows become the stack, the profile the board shape, features free pads, tracks and fills (standard symbols; coordinates in inches or mm, symbols in mils or microns), drill layers holes, components and the cadnet netlist nets and REF.pin designators; user symbols, other standard symbols, arcs, text, negative features and layers, nested steps and mask / paste / rout layers are typed skips. Tested on jobs we wrote, not yet on one from a CAM tool. TL3c: `blob` (a blob id) instead of `text` or `bytes_base64`: the file is read from the blob as the caller and imported exactly as if sent inline; giving both is 400 FILE_GIVEN_TWICE.
POST
/
v1
/
eda.import
A .kicad_sch / .kicad_pcb / project JSON / Gerber / Excellon text or an ODB++ job into the document (E7.11 + E7.13 CAM + IG26)
curl --request POST \
--url https://api.eddy.engineer/v1/eda.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"format": "<string>",
"blob": "<string>",
"bytes_base64": "<string>",
"document": {},
"layer": "<string>",
"layer_map": {},
"sheet": "<string>",
"step": "<string>",
"text": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/eda.import"
payload = {
"format": "<string>",
"blob": "<string>",
"bytes_base64": "<string>",
"document": {},
"layer": "<string>",
"layer_map": {},
"sheet": "<string>",
"step": "<string>",
"text": "<string>"
}
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({
format: '<string>',
blob: '<string>',
bytes_base64: '<string>',
document: {},
layer: '<string>',
layer_map: {},
sheet: '<string>',
step: '<string>',
text: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/eda.import', 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/eda.import",
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([
'format' => '<string>',
'blob' => '<string>',
'bytes_base64' => '<string>',
'document' => [
],
'layer' => '<string>',
'layer_map' => [
],
'sheet' => '<string>',
'step' => '<string>',
'text' => '<string>'
]),
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/eda.import"
payload := strings.NewReader("{\n \"format\": \"<string>\",\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"document\": {},\n \"layer\": \"<string>\",\n \"layer_map\": {},\n \"sheet\": \"<string>\",\n \"step\": \"<string>\",\n \"text\": \"<string>\"\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/eda.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"format\": \"<string>\",\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"document\": {},\n \"layer\": \"<string>\",\n \"layer_map\": {},\n \"sheet\": \"<string>\",\n \"step\": \"<string>\",\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/eda.import")
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 \"format\": \"<string>\",\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"document\": {},\n \"layer\": \"<string>\",\n \"layer_map\": {},\n \"sheet\": \"<string>\",\n \"step\": \"<string>\",\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"document": {},
"document_hash": "<string>",
"format": "<string>",
"report": {}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
application/json
TL3c: a blob id (b3:<64 hex>: an upload's blob_id, an attachment's blob) holding the file, instead of text or bytes_base64 (an odbpp job goes as bytes): read as the caller under the read gate (a blob the caller may not read answers 404 BLOB_NOT_FOUND, as an absent one) and imported exactly as if its contents were sent inline. Give one of the two (both: 400 FILE_GIVEN_TWICE).
The file, for every format but odbpp