CAD.ai API Documentation

Welcome to CAD.ai! This is our API documentation.

Materials API

List of material types

Return list of materials types available for search (Plastics, Metals, Ceramics, Resins, Castables/Wax, Elastics, Sandstone).

POST
/api/v1/materials/types

Example request

$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('http://api.cad.ai/api/v1/materials/types');
$request->setRequestMethod('POST');
$request->setHeaders(array(
'cache-control' => 'no-cache',
'api-key' => '***'));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();

Example response

[
  {
    "label": "Gold",
    "value": "gold"
  },
  {
    "label": "Plastic",
    "value": "plastic"
  },
  {
    "label": "Precious Metals",
    "value": "precious_metals"
  }
]

Price API

This API allows to query the price that would be billed to 3D print a given design.

Property Description
material (required) one of material types (one of values in list returned by List of material types API)
unit (optional) unit of the design (‘mm’, ‘in’, default ‘mm’)
currency (optional) currency in which price is returned (‘EUR’, ‘USD’, default ‘USD’)
file_url (required) flle url for web2web upload
POST
/api/v1/query

Example request

$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->addForm(array(
'unit' => 'mm',
'currency' => 'USD',
'metrial' => 'metal,sendstone',
'file_url' =>
'https://raw.githubusercontent.com/3dponics/Drip-3Dponics/master/Conduit%20with%20Hole/3Dponics-Conduit-with-Hole.STL' ), NULL);
$request->setRequestUrl('https://api.cad.ai/api/v1/query');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders(array(
'api-key' => '***'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();

Example request body

{
  "prices":[
    {
      "vendor": "sculpteo",
      "name": "Plastic (Nylon) - 60μm",
      "finishing": "Raw (rough & grainy)",
      "price": "13.36",
      "color": "burgundy",
      "order_url":
      "https://app.3dprintler.com/sculpteo-web2web/6RfyghZWaaAJN8raL/burgundy_plastic_60u/mm/burgundy/13.36"
    },
    {
      "vendor": "shapeways",
      "name": "Plastic (High-Detail Acrylic)",
      "finishing": "Smooth & Slightly Shiny",
      "price": 14.4,
      "color": "transparent",
      "order_url":
      "https://www.shapeways.com/create?utm_source=3dprintler&utm_medium=serp"
    }
  ]
}

CAD Parameter Extraction API

This API allows to get information about 3D file, like boxarea, volume, xCenter, yCenter, zCenter.

Property Description
unit (required) unit of the design (‘mm’, ‘in’)
file_url (required) flle url for web2web upload
POST
/api/v1/fileinfo

Example request

$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->addForm(array(
'unit' => 'mm',
'file_url' =>
'https://raw.githubusercontent.com/3dponics/Drip-3Dponics/master/Conduit%20with%20Hole/3Dponics-Conduit-with-Hole.STL' ), NULL);
$request->setRequestUrl('https://api.cad.ai/api/v1/fileinfo');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders(array(
'api-key' => '***'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();

Example request body

{
  "bacisinfo": {
    "boxarea": "93.96",
    "xCenter": "43.19",
    "yCenter": "88.90",
    "zCenter": "6.50",
    "volume": "3.979"
  }
}
Show examples in:
CAD.ai API Documentation