Skip to content

Getting started

Quickstart

Create an API key and make your first request to the ENTON API.

1. Get a plan and a key

The API needs an active Trader or Partner plan; keys on a free account are refused. With a plan in place, open the developer portal, create a key and choose its environment (live or test) and scopes. The full key is shown once, so copy it then.

Keep it in an environment variable rather than in code. Every sample in these docs reads it from there:

Shell
export ENTON_API_KEY="enton_live_..."   # paste your key

2. Check the API is up

GET /api/v1/health needs no key. A 200 with "status": "healthy" means the API and its database are reachable.

curl "https://enton.ai/api/v1/health"

3. Ask a question

Send a question to AI query. The text of the answer is in answer.summary; any structured data the engine retrieved is in answer.displayData.

curl -X POST "https://enton.ai/api/v1/ai/query" \
  -H "Authorization: Bearer $ENTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is Tesla doing today? Show news and price."
  }'

4. Handle errors

Errors come back as JSON with an error message and the status code. Branch on the status: 400 means fix the request, 401 means the key, plan or monthly quota, 403 means a missing scope, and 429 means wait for the number of seconds in Retry-After. The errors and rate limits page lists every case.

Next steps