Skip to content

astrosinyal.com

Where Planets Meet Probabilities | AMI Trading Intelligence

  • Home
    • English
    • Indonesia
  • Read Me First – Knowledge Based Here
  • BYOK Api Key
  • Discord

BYOK API KEY

🌌 Astrosinyal · AMI Docs BYOK GUIDE
🏠 All chaptersStartAccountDashboardSignalsTradingViewJournalRiskClimateFactor LabBillingFAQGlossary

Bring Your Own Key (BYOK): Groq & OpenRouter

Applies to: AMI Portal → Integrations panel
Goal: create an LLM API key and connect it to AMI for AI reasoning & Telegram replies · Time: ~5 minutes

1. What BYOK is and when you need it

AMI can use a Large Language Model (LLM) to write the AI reasoning section of your signals and to answer Telegram bot commands. That call needs an API key.

PlanLLM source
FreeNo pooled server key → AI reasoning stays in template mode unless you add your own key
Standard (Rp99.000 / $7 /30 days)Server pooled key included — BYOK optional

Resolution order (automatic): your key → server pooled key → built-in template mode (no external call). If you save a key, it always wins.

Privacy & storage: keys are stored per-tenant, encrypted at rest (Fernet authenticated encryption) and never shown in full — only a mask. With your key active, the data sent for AI reasoning (symbol, OHLCV-derived features, Vedic context, scores) goes only to the provider you choose, under that provider’s privacy policy. Replace or delete keys anytime; changes apply on the next AI call.

2. Which provider should you pick?

 GroqOpenRouter
CostFree tier (rate-limited)Pay-as-you-go credits; many :free models
StrengthExtremely fast inferenceOne key → hundreds of models
AMI default modelllama-3.3-70b-versatile openai/gpt-4o-mini (small credit needed)
Key formatgsk_...sk-or-v1-...
Best for$0 cost, testing BYOKModel choice or premium models

Both work identically in AMI — only one key is active at a time.

3. Part A — Get a Groq API key (≈2 minutes)

  1. Open console.groq.com and sign in (Google or GitHub).
  2. In the left sidebar open API Keys.
  3. Click Create API Key, name it something you will recognize later (e.g. ami-byok), then Create.
  4. Copy the key immediately — it starts with gsk_ and is shown only once. Save it in a password manager. Lost it? Create another key and revoke the old one.
  5. (Optional) The Models page lists the AMI default llama-3.3-70b-versatile and other free models.
  6. (Optional) The Usage page shows your daily request consumption.
Groq’s free tier has per-day rate limits. If you hit HTTP 429, wait for the limit window to reset — it is not a broken key.

4. Part B — Get an OpenRouter API key (≈3 minutes)

  1. Open openrouter.ai and sign in (GitHub or Google).
  2. Go to Credits and add credit (card/PayPal) — needed for paid models such as the default openai/gpt-4o-mini.
    Free alternative: browse the Models page and pick any model ending in :free (e.g. meta-llama/llama-3.3-70b-instruct:free) — no credit required; you type that name into the Model field later.
  3. Open Keys → Create Key.
  4. Optionally set a name (ami-byok) or a monthly spend limit, then create.
  5. Copy the key immediately — it starts with sk-or-v1- and is shown only once. Save it in a password manager.
  6. (Optional) The Activity page tracks spend per key.

5. Connect the key to AMI (≈30 seconds)

  1. Log in to the portal: ami.astrosinyal.com/portal
  2. Open Integrations (๐Ÿ”Œ Integrations โ€” BYOK).
  3. Fill in:
    • Provider → groq or openrouter (must match where you created the key).
    • API key → paste your gsk_... or sk-or-v1-....
    • Model (optional) → leave empty for the provider default, or type another model name.
  4. Click ๐Ÿ’พ Save LLM key.
  5. Click ๐Ÿงช Test — a green confirmation means the key works end-to-end; any red error is explained in section7.
  6. Verify in practice: run an analysis — the AI reasoning block should now contain a written explanation instead of the built-in template text.
Change later: paste a new key and Save (applies on the next AI call). To remove: ๐Ÿ—‘ Remove → AMI falls back to pooled/template mode.

6. Model field reference

  • Accepted format: letters, digits, and - _ . : / (1–100 chars). Examples: llama-3.3-70b-versatile, openai/gpt-4o-mini, meta-llama/llama-3.3-70b-instruct:free.
  • Wrong format → Invalid model name (1-100 chars: letters, digits, - _ . : /).
  • Wrong provider → Invalid provider - choose groq or openrouter.
  • Leave it empty if unsure — AMI uses the tested provider default.

7. Troubleshooting

Symptom / errorCauseFix
Invalid provider - choose groq or openrouter. Dropdown does not match the key Pick the provider where the key was created
Invalid model name (...)Illegal chars or too long Only - _ . : / allowed; or leave empty
HTTP 401 / 403 from TestWrong, truncated, or revoked key Re-copy from the provider dashboard and Save again
HTTP 429Provider rate limit (common on Groq free tier) Wait for the window to reset, or switch model
HTTP 402 / insufficient creditOpenRouter paid model without credit Add credit, or use a :free model name
Model not found (HTTP 400)Typo in Model field Leave Model empty or copy the exact model ID from the provider’s model list
AI reasoning still template after savingKey not saved or Test failed Check the green/red message under the buttons; Save again
Key exposed somewhere by mistake— Revoke it at the provider, create a new one, Save it in AMI

8. Security checklist

  • ✅ Treat API keys like passwords — never post them in chats, charts, or repos.
  • ✅ AMI shows only a mask after saving; the full key cannot be re-displayed.
  • ✅ Keys are encrypted at rest per tenant and used only for calls to the provider you selected.
  • ✅ Rotate freely: revoke at the provider, paste the new key, Save.
  • ✅ Spend limits (OpenRouter) are a good extra guard on shared machines.
← All chaptersBilling →
AMI provides tools and calibrated probability, never certainty (model AUC ≈ 0.53) · Not financial advice · BYOK keys and their usage are governed by each provider’s own terms and privacy policy.

Copyright © 2026 astrosinyal.com.

Theme: Oceanly Green by ScriptsTown