# Calculate manufacturing cost with one API call.
URL: https://arcnm.io/developers
Language: en

Send a STEP file from your code or from your AI agent. In seconds you get the unit price for ten lot sizes, the process plan and the times. Every number names its source.

## Quickstart: how do I calculate manufacturing cost with the API?
Create a free account and mint an API key in the settings. Give it the scopes parts:read, parts:write and uploads:write, and send it in the X-API-Key header. From the OpenAPI 3.1 spec at api.arcnm.io/api/v1/openapi-public.json you generate a typed client. The full reference, with every example in cURL, Python and TypeScript, lives at arcnm.io/docs.

## How do I upload a part and calculate it?
POST /api/v1/calculations/upload-and-quote takes the files as a multipart form and starts the calculation. cad_file with the STEP file and part_number are required, drawing_file and lot_size are optional. A sheet part can also come as a DXF flat pattern, with sheet_gauge_mm and a material. The answer comes at once: status 202 with the calculation id.
```
curl -X POST https://api.arcnm.io/api/v1/calculations/upload-and-quote \
  -H "X-API-Key: $ARCNM_API_KEY" \
  -F "part_number=PART-001" \
  -F "lot_size=50" \
  -F "cad_file=@part.step" \
  -F "drawing_file=@part.pdf"
```

## How do I fetch the result?
GET /api/v1/calculations/{calculation_id} returns the state of the calculation. Poll until status reads succeeded, or let a webhook tell you. The response then holds the unit cost, the lot-size curve, the process plan and the audit trail. A calculation takes seconds, and a failed one costs nothing.
```
curl https://api.arcnm.io/api/v1/calculations/$CALC_ID \
  -H "X-API-Key: $ARCNM_API_KEY"

# Response, shortened
{
  "status": "succeeded",
  "lot_size": 50,
  "currency": "EUR",
  "unit_cost": …,
  "setup_cost": …,
  "unit_time_s": …,
  "offer_price": …
}
```

## How do AI agents use the MCP server?
The MCP server runs at https://api.arcnm.io/mcp-server/mcp over Streamable HTTP. Claude, ChatGPT, Cursor and custom agents sign in with OAuth 2.1 or an API key as bearer token. The agent hands you an upload link or uploads the file itself, then starts the calculation and reads the result. Every tool answer is typed and carries its source.
```
claude mcp add -t http arcnm https://api.arcnm.io/mcp-server/mcp \
  --header "Authorization: Bearer $ARCNM_MCP_TOKEN"
```

## How do webhooks tell me the calculation is done?
Instead of polling, subscribe to calculation.succeeded or calculation.failed with a webhook. Nine signed events cover calculation, extraction-budget, wallet and billing signals. Every delivery is signed and verifiable. A long-running calculation then tells your stack the moment it finishes.

## FAQ
**Is there an API that returns the manufacturing cost of a CAD file?**
Yes. POST /api/v1/calculations/upload-and-quote, or MCP at https://api.arcnm.io/mcp-server/mcp. You pay only on a 200. The upload call takes a STEP file and starts the calculation. A PDF drawing is optional. A sheet part can also come as a DXF flat pattern with its thickness and material. GET /api/v1/calculations/{calculation_id} returns the itemised cost, the lot-size curve, the process plan and the full audit trail. The OpenAPI 3.1 spec is at api.arcnm.io/api/v1/openapi-public.json. You authenticate with X-API-Key.

**Can an AI agent such as Claude or ChatGPT use ARCNM to price parts?**
Yes, through the ARCNM MCP server at https://api.arcnm.io/mcp-server/mcp. It speaks Streamable HTTP and accepts OAuth 2.1 or a bearer token. An agent can upload a part, start the calculation and read the result. It can then explain the cost, rank the drivers, optimise the lot size and compare options. Every tool answer is typed and auditable.

**Can I batch-quote many parts or compare several plants?**
Yes. The batch endpoint prices up to 500 part × environment cells in one call, up to 16 costing environments per part. The comparison endpoint returns the matrix: the best environment per part, the deltas and the lot-curve overlays. Make-or-buy and multi-plant questions take one request.

**How do I calibrate the model to my own costs?**
Send known real costs to the calibration endpoints of a costing environment. They can come from your quotes or an ERP export. ARCNM calibrates that environment to your cost level, with a confidence band. The physics stays untouched. Every later calculation in that environment uses the calibration.

