For developers

Formula AI API documentation

Integrate chemical AI into your applications in just a couple of lines of code

Overview

The Formula AI API gives you programmatic access to all of our platform's capabilities — from smart formula search to knowledge extraction from books and regulatory compliance checks — securely, quickly, and easily.

REST
JSON Standard
99.9%
Uptime SLA
< 200ms
Average latency
v3.0
Current version

Base API URL:

BASE https://api.jamilformula.com/v3

Authentication

All API requests require an API key sent in the header. Get your key from Dashboard → Settings → API Keys.

curl -X GET "https://api.jamilformula.com/v3/formulas/search" \ -H "Authorization: Bearer fa_live_sk_..." \ -H "Content-Type: application/json"

⚠️ Security: Never expose your key in frontend code. Always use environment variables.

Regulatory compliance check

Verify that a formula complies with regulations in any country in the world.

POST /compliance/check
# Python import requests response = requests.post( 'https://api.jamilformula.com/v3/compliance/check', headers={'Authorization': f'Bearer {os.environ["FORMULA_AI_KEY"]}'}, json={ 'formula_id': 'FA-2026-04891', 'countries': ['SA', 'AE', 'EG', 'EU', 'US'] } ) result = response.json() print(f"Compliant in {result['compliant_countries']} of {result['total']} countries")

Extract from a book

Upload a book and extract formulas from it programmatically.

POST /books/extract
# Upload book and extract formulas curl -X POST "https://api.jamilformula.com/v3/books/extract" \ -H "Authorization: Bearer fa_live_sk_..." \ -F "file=@./CosmeticFormulary.pdf" \ -F "language=auto" \ -F "complete_missing=true"

Official SDK packages

Use our official packages for better support and automatic error handling.

Node.js / TypeScript

npm install @formula-ai/sdk
🐍

Python

pip install formula-ai
🐹

Go

go get github.com/formula-ai/go

Java / Kotlin

implementation 'ai.formula:sdk:3.0'

Rate limits

Limits depend on your plan:

Plan Requests/day Requests/minute Max latency
Free
Professional1,0003030s
Business50,00020060s
EnterpriseUnlimited1,000120s

Error codes

Code Description Solution
401UnauthenticatedCheck your API key
403Plan does not allowUpgrade your plan
429Rate limit exceededWait a minute and retry
500Server errorContact support