Quick start

Sign in, create a key on the API keys page, and send a photo to the API you need, for example POST /v1/food. Every API takes the photo the same way and answers with JSON. Call the API from your server, not from a browser or a mobile app bundle.

curl https://ourapi.keronlabs.com/v1/food \
  -H "Authorization: Bearer $FORKCAST_KEY" \
  -F image=@lunch.jpg \
  -F context="I ate about half"

APIs

EndpointWhat it returnsPrice
POST /v1/foodEach food on the plate with its weight in grams, and calories and macros from USDA FoodData Central.$0.01
POST /v1/skinScores for acne, wrinkles, spots, redness, pores and more from one selfie, with skin type and ingredient suggestions.$0.01
POST /v1/bodyA physique score, a body fat range, muscle development by group, V-taper and posture, with training focus.$0.01
POST /v1/colorPersonal color analysis: the 12-season type, undertone and contrast, with a fixed palette to wear and avoid.$0.01
POST /v1/plantSpecies from a photo, checked against GBIF, with health problems, treatment steps, pet toxicity and care.$0.01
POST /v1/labelNutrition table, ingredients, Nutri-Score, NOVA group, additives and allergens from a photo of a food or cosmetic label.$0.01

GET /v1/engines returns the same list as JSON, with every API's parameters. It needs no key.

Authentication

Send your key as Authorization: Bearer fk_live_…. You can also pass it as an api_key query parameter, but the header keeps it out of server logs. Keys are shown once when you create them; revoke a key from the dashboard and it stops working at once.

Sending a photo

FieldTypeDescription
imagefile (multipart)The photo. JPEG, PNG, WebP or GIF, up to 5 MB.
image_base64string (JSON)The photo as base64. A data: URL prefix is accepted and stripped.
media_typestring (JSON)MIME type of image_base64. Defaults to image/jpeg.
image_urlstringA public http(s) URL of the photo, as a JSON or multipart field.

Each API also takes its own optional fields, such as the user's age or what they ate. They go next to the photo, as form fields or JSON keys, and are listed on each API's page. Facts the user gives are trusted over what the photo shows.

Response

Every response has a metadata object (id, engine, cached, credits_used, processing_ms) and a one-line summary you can show in a list, followed by the API's own fields. Skin, body and color responses include a quality object with a reliability rating and photo warnings.

GET /v1/account

Returns the account balance and this key's usage for the month. It is free to call.

{
  "balance_usd": 8.42,
  "scans_left_on_balance": 842,
  "key": { "scans_this_month": 158, "monthly_limit": 1000 }
}

Errors

Errors come back as { "error": { "code", "message" } }. You are only charged for a 200.

StatusCodeMeaning
400missing_imageNo photo in the request.
400invalid_paramA field is outside its allowed values. The message says which.
400invalid_imageThe photo could not be read.
401invalid_api_keyMissing, unknown or revoked key.
402insufficient_creditThe account is out of credit.
404unknown_engineNo API at that path.
413image_too_largeOver 5 MB.
415unsupported_media_typeNot JPEG, PNG, WebP or GIF.
422no_faceSkin or color: no face in the photo.
422minor_detectedBody: the person looks under 18.
422refusedThe image cannot be analyzed.
429key_limit_reachedThe key hit its monthly limit. Raise it in the dashboard.
429rate_limitedMore than 60 calls a minute on one key. Back off and retry.
502 / 503upstream_errorThe vision model failed or is busy. Retry.

Billing and limits

Each successful new call costs the price listed with its API, drawn from prepaid credit. An identical request (same photo, same fields) is served from cache for free and marked cached: true. Every key can have a monthly call limit, which resets on the 1st of the month (UTC). Set one for each app so a bug or a leaked key can only spend so much. The rate limit is 60 calls a minute per key.