API Documentation

Integrate Footprint AI's PCB library generation directly into your applications with our simple REST API.

API Endpoint

POST https://inference.footprintai.net/v1/api/generate-lib/

Authentication

Headers

Include your API token in the request header:

Authorization: Key YOUR_API_TOKEN

Request Body

Send a multipart/form-data request with the following fields:

Content-Type: multipart/form-data

files: [binary file data]    # PDF datasheet or image
prompt: string               # Description of the component (optional)
tool_type: string            # Target EDA tool: "eagle", "kicad", or "allegro"

Supported file formats: PDF, PNG, JPEG

Max file size: 10MB

Response

On success, returns a JSON object with the generated library content:

{
  "result": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE eagle ...>...",
  "success": true
}

Code Examples

curl -X POST https://inference.footprintai.net/v1/api/generate-lib/ \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "files=@/path/to/datasheet.pdf" \
  -F "tool_type=eagle" \
  -F "prompt=QFN-48 package with exposed pad"

Tokens

API requests consume tokens from your subscription plan:

  • Basic Plan: 500K generation tokens/month
  • Pro Plan: 1M generation tokens/month
  • Pro MAX Plan: 2M generation tokens/month

Error Responses

// 401 Unauthorized - Invalid or missing API token
{"error": "Invalid API token"}

// 402 Payment Required - Subscription required or tokens exhausted
{"error": "Subscription required"}

// 400 Bad Request - Invalid request parameters
{"error": "Missing required field: files"}

Ready to Get Started?

Sign up for a subscription plan to get your API key.

Get API Key