API Documentation

Integrate A1NMR predictions into your workflow

Authentication

All API requests require authentication via Bearer token. Include your API key in the Authorization header.

Authorization: Bearer A1NMR_your_api_key_here

Get your API key from the API Keys page.

Single Prediction

POST https://api.A1NMR.ai/v1/predict

Request Body

{
  "smiles": "CCO",
  "format": "json"
}

Response

{
  "job_id": "nmr-20260626-abc123",
  "status": "completed",
  "duration_ms": 1250.0,
  "input": {"smiles": "CCO"},
  "result": {
    "num_atoms": 3,
    "num_carbons": 2,
    "chemical_shifts": [
      {"atom_index": 0, "element": "C", "shift_ppm": 58.20},
      {"atom_index": 1, "element": "C", "shift_ppm": 17.50}
    ],
    "predicted_spectrum": {
      "x": [58.2, 17.5],
      "y": [1.0, 0.8],
      "peak_width": 0.5
    }
  }
}

cURL Example

curl -X POST https://api.A1NMR.ai/v1/predict \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"smiles": "CCO"}'

Python Example

import requests

response = requests.post(
    "https://api.A1NMR.ai/v1/predict",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"smiles": "CCO"}
)
data = response.json()
for shift in data["result"]["chemical_shifts"]:
    print(f"C{shift['atom_index']}: {shift['shift_ppm']} ppm")

Batch Prediction

Upload a CSV file containing SMILES strings for batch processing.

POST https://api.A1NMR.ai/v1/predict/batch
curl -X POST https://api.A1NMR.ai/v1/predict/batch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@molecules.csv"

Error Handling

{
  "error": "invalid_smiles",
  "message": "The provided SMILES string is not valid"
}

400 Bad Request — Invalid SMILES or parameters

401 Unauthorized — Missing or invalid API key

429 Too Many Requests — Rate limit exceeded

500 Internal Server Error — Something went wrong

Rate Limits

Rate limits depend on your plan:

PlanRate LimitMonthly Molecules
Free10 req/min50
Pro100 req/min5,000
Team500 req/min50,000
EnterpriseCustomUnlimited