Authentication
Use a Redline API key, keep it private and separate credentials for each client engagement.
Authenticate each request
Send your API key in the Authorization header. Account login credentials and console session tokens are not inference API keys.
HTTP header
Authorization: Bearer $REDLINE_API_KEY Keep keys on your side
- Store keys in environment variables or a secrets manager.
- Do not put keys in a URL, repository, client report or browser bundle.
- Use a separate key for each client engagement; choose a budget, expiry and model allow-list.
- Revoke a key immediately if it is exposed. Create a replacement and update the tools that use it.
Test the connection
This shell command checks the model list and requests a one-token completion. It is billable. OK indicates both HTTP calls succeeded; it does not prove tool-use compatibility. Errors remain visible for diagnosis.
Bash / zsh
curl --fail-with-body --silent --show-error "https://api.redline-api.duckdns.org/v1/models" -H "Authorization: Bearer $REDLINE_API_KEY" && curl --fail-with-body --silent --show-error "https://api.redline-api.duckdns.org/v1/chat/completions" -H "Authorization: Bearer $REDLINE_API_KEY" -H "Content-Type: application/json" -d '{"model":"redline-core","messages":[{"role":"user","content":"Reply OK"}],"max_tokens":1}' && printf '\nOK\n' || { printf '\nFAIL: inspect the HTTP error above\n'; exit 1; } If authentication fails
Check for an empty environment variable, a copied space, a revoked or expired key, and the correct host. Do not send your key to support. Include the timestamp, model and request ID if one is returned.