Compass Food Technologies
DocsQuickstart

Docs

Quickstart

Make a first Compass API call in five minutes.

The explainable dietary decision layer for AI agents.

1. Get a Sandbox key

Create a Sandbox account and copy the key that starts with cmp_test_. Paid tiers use keys that start with cmp_live_. Send the key in the X-Compass-API-Key header.

2. Call Search

Set COMPASS_API_KEY in your shell or runtime environment. The examples below do not print the key in source code.

Start with a natural-language restaurant search.

$headers = @{
  "X-Compass-API-Key" = $env:COMPASS_API_KEY
  "X-Compass-Mode" = "fast"
}

$body = @'
{
  "query": "plant-based sushi in Austin",
  "limit": 5
}
'@

Invoke-RestMethod `
  -Method Post `
  -Uri "https://api.compassfoodtechnologies.com/v1/search" `
  -Headers $headers `
  -ContentType "application/json" `
  -Body $body

3. Run the example locally

If you are using the JavaScript tab, create a local Node file named first-call.mjs with that example, then run it with npm:

npm init -y
npm pkg set type=module
node first-call.mjs

Response fields to inspect first

FieldTypeNotes
results[]arrayRanked restaurants for the submitted query.
results[].match_for_profileobjectDecision, confidence, reason codes, and risk flags when a profile is sent.
evidence[]arraySource pointers used by rich responses.
source_freshnessobjectAge of the oldest and newest signal plus refresh guidance.

unknown is a valid conservative decision when evidence is insufficient, conflicting, or stale. Treat it as guidance to verify details with the restaurant.

Terminology

FieldTypeNotes
Account planquota and featuresControls monthly quota, endpoint access, support level, and billing.
Evidence tiersource strengthDescribes the source quality and freshness behind an evidence item.
Compass Food Technologies