Quickstart

Make your first API request in under 60 seconds.

1. Get your API key

Sign up at developer.c0r.ai/signup — takes about 30 seconds. You will receive a key starting with fdb_.

2. Search for a food product

curl

curl "https://api.c0r.ai/v1/search?q=apple" \
  -H "X-API-Key: fdb_your_key"

Python

import requests

response = requests.get(
    "https://api.c0r.ai/v1/search",
    params={"q": "apple"},
    headers={"X-API-Key": "fdb_your_key"}
)
print(response.json())

JavaScript

const response = await fetch(
  "https://api.c0r.ai/v1/search?q=apple",
  { headers: { "X-API-Key": "fdb_your_key" } }
);
const data = await response.json();
console.log(data);

3. Look up by barcode

curl

curl "https://api.c0r.ai/v1/barcode/3017620422003" \
  -H "X-API-Key: fdb_your_key"

Python

response = requests.get(
    "https://api.c0r.ai/v1/barcode/3017620422003",
    headers={"X-API-Key": "fdb_your_key"}
)
print(response.json())

JavaScript

const response = await fetch(
  "https://api.c0r.ai/v1/barcode/3017620422003",
  { headers: { "X-API-Key": "fdb_your_key" } }
);
const data = await response.json();
console.log(data);

4. Analyze a dish with AI

curl

curl -X POST "https://api.c0r.ai/v1/analyze" \
  -H "X-API-Key: fdb_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text": "200g salmon with 150g brown rice"}'

Python

response = requests.post(
    "https://api.c0r.ai/v1/analyze",
    json={"text": "200g salmon with 150g brown rice"},
    headers={"X-API-Key": "fdb_your_key"}
)
print(response.json())

JavaScript

const response = await fetch("https://api.c0r.ai/v1/analyze", {
  method: "POST",
  headers: {
    "X-API-Key": "fdb_your_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ text: "200g salmon with 150g brown rice" }),
});
const data = await response.json();
console.log(data);

Next Steps