Flash docs

Start here

From approved account to first Flash completion — key creation, environment credential, discovery, and a working first request.

What Flash is

Flash is a single, stable product exposed through an OpenAI-compatible Chat Completions surface. There is one base URL and one model id in the examples here; use the exact id discovery returns. Access is granted to authorized accounts only — there is no self-serve public signup for the API.

1. Approved access

An account becomes able to call Flash when its key is valid and its access authority is synchronized — either an active legacy grant or a fully synchronized subscription period. Access is decided per request from account status, key state, and authority — see Limits and billing for the exact rules. If you were onboarded directly, your key was delivered through that process; if you have a portal account, you manage keys yourself.

2. Create a key safely (portal)

In the portal API keys page:

  1. Create a key with an alias you can recognize, and pick an expiration where your risk model calls for one (one key per tool makes revocation surgical).
  2. Copy the key once at creation. Store it in your secret manager, OS keychain, or a private environment file — never in source code, prompts, URLs, screenshots, or logs.
  3. Rotate (revoke + reissue) the moment a key might have leaked or an integration is decommissioned. Once revoked or expired, a key no longer authorizes requests.

3. Export it as an environment credential

Use a single environment variable for the value and reference it everywhere. The secure pattern is secret-manager injection into the environment of the process that runs the calls:

export TERALOR_API_KEY="<injected from your secret manager>"   # never commit or echo the value

Check that the variable is set without printing it:

test -n "$TERALOR_API_KEY" && echo "TERALOR_API_KEY is set" || echo "TERALOR_API_KEY is missing"

The examples below read $TERALOR_API_KEY and never inline a literal key. The base URL below reflects this environment — the canonical downloadable skills show the production endpoint, so always choose the endpoint and key that match the environment you were onboarded into, and never mix them.

4. Discovery first: confirm what is callable now

Start a session (or a worker) with authenticated discovery instead of remembered limits:

curl -s https://api.teralor.com/v1/models \
-H "Authorization: Bearer $TERALOR_API_KEY"

A successful response is an OpenAI-style list whose data contains each callable model with its current context_length, max_input_tokens, max_output_tokens, capabilities, and policy_revision. Treat these as the authority for what a request may ask for. Note that discovery success confirms the key and account were authorized at that moment — a later completion can still be refused by budget, rate limiting, or runtime state, so keep handling errors on every call.

5. First completion

curl -s https://api.teralor.com/v1/chat/completions \
-H "Authorization: Bearer $TERALOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "Flash",
  "messages": [
    {"role": "user", "content": "Reply with exactly: setup verified"}
  ],
  "max_tokens": 32,
  "stream": false
}'

You should receive a standard chat-completion JSON object with a choices array. If you get a 401 or 403 instead, work through Troubleshooting: the status narrows the category, but the response message and your account state determine the exact cause.

Next steps

On this page