Anomic AI API
Build with Anomic AI
Bring BFSI-specialist answers into your own products, internal tools and workflows. The API is compatible with the OpenAI Chat Completions format, so the official OpenAI SDKs work by changing the base URL.
Quick start
- Create an account or sign in.
- Open Settings → Developer and click Create new key. Copy the key — it is shown only once.
- Save it as an environment variable, e.g.
ANOMIC_API_KEY, and make your first request:
curl https://anomicai.com/api/v1/chat/completions \
-H "Authorization: Bearer $ANOMIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anomic-bfsi/payments_cards",
"messages": [
{"role": "system", "content": "Answer for an Indian bank operations team."},
{"role": "user", "content": "What is the TAT for resolving a failed UPI transaction?"}
]
}'Python (OpenAI SDK)
# pip install openai
import os
from openai import OpenAI
client = OpenAI(base_url="https://anomicai.com/api/v1", api_key=os.environ["ANOMIC_API_KEY"])
reply = client.chat.completions.create(
model="anomic-bfsi/kyc_aml_compliance",
messages=[{"role": "user", "content": "Summarise the periodic KYC update rules."}],
)
print(reply.choices[0].message.content)JavaScript / TypeScript (OpenAI SDK)
// npm install openai
import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://anomicai.com/api/v1', apiKey: process.env.ANOMIC_API_KEY });
const reply = await client.chat.completions.create({
model: 'anomic-bfsi',
messages: [{ role: 'user', content: 'Explain the Basel III liquidity coverage ratio.' }],
});
console.log(reply.choices[0].message.content);Authentication
Every request needs an API key, sent as Authorization: Bearer <key> (an x-api-key header also works). Keys start with anm_. Requests run on behalf of the account that created the key and count toward its plan.
Chat completions
POST https://anomicai.com/api/v1/chat/completions
| Field | Description |
|---|---|
| messages | Required. Array of { role, content } with role system, user or assistant. The last message must be from the user. Up to 50 messages. |
| model | Optional. Defaults to anomic-bfsi. See Models. |
| temperature | Optional, 0–2. Defaults to 0.4. |
| max_tokens | Optional. Maximum reply length, up to 4096 tokens. Defaults to 2048. |
| stream | Optional. When true, the reply is returned as server-sent events in the OpenAI chunk format, ending with data: [DONE]. |
Response
{
"id": "chatcmpl-…",
"object": "chat.completion",
"created": 1793500000,
"model": "anomic-bfsi/payments_cards",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "For a failed UPI transaction…" },
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 64, "completion_tokens": 212, "total_tokens": 276 }
}Models
Use anomic-bfsi for general BFSI questions, or pin a domain specialist with anomic-bfsi/<domain>. You can also list them with GET https://anomicai.com/api/v1/models.
anomic-bfsiGeneral banking, financial services and insurance assistant.anomic-bfsi/corporate_commercial_bankingCorporate & Commercial Banking — Corporate lending, cash management, trade creditanomic-bfsi/retail_bankingRetail Banking — Accounts, personal loans, cards, onboardinganomic-bfsi/payments_cardsPayments & Cards — Cards, gateways, payment rails, settlementsanomic-bfsi/core_banking_digital_channelsCore Banking & Digital Channels — Core banking systems and digital channelsanomic-bfsi/wealth_asset_managementInvestment Banking — M&A, capital markets, IPOs, securitiesanomic-bfsi/kyc_aml_complianceKYC/AML & Compliance — KYC, AML screening, compliance reportinganomic-bfsi/insuranceInsurance — Policies, underwriting, claims, complianceanomic-bfsi/lending_nbfcLending / NBFC — Loan origination, underwriting, collectionsanomic-bfsi/treasury_riskTreasury & Risk — Liquidity, ALM, market and credit risk
Simple ask endpoint
For one-off questions, POST https://anomicai.com/api/v1/ask takes message, an optional section (domain id) and optional context, and returns { response, citations, section, tokensUsed }.
curl https://anomicai.com/api/v1/ask \
-H "Authorization: Bearer $ANOMIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"section": "insurance", "message": "What is a free-look period?"}'Limits & usage
- 60 requests per minute per key.
- Each successful request counts as one generation toward your plan’s allowance — the same allowance you use in the app. See Pricing.
- Up to 10 active keys per account. Each key shows when it was last used and how many requests it has made.
- API requests are not saved to your chat history.
Errors
Errors use the OpenAI shape: { "error": { "type", "code", "message" } }.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request_error / model_not_found | The body is malformed, or the model or section id is unknown. |
| 401 | invalid_api_key | The key is missing, wrong, or has been revoked. |
| 403 | account_deactivated | The account that owns the key is deactivated. |
| 429 | rate_limit_exceeded | More than 60 requests in a minute on one key. Wait for Retry-After seconds. |
| 429 | insufficient_quota | Your plan’s request allowance is used up. Upgrade to continue. |
| 502 | upstream_error | The model is temporarily unavailable. Retry with backoff. |
Keeping keys safe
- Treat keys like passwords. Never put them in browser or mobile app code, or commit them to a repository.
- Call the API from your server and keep the key in an environment variable or secrets manager.
- Use a separate key per app or environment so you can revoke one without affecting the others.
- If a key leaks, revoke it immediately in Settings → Developer and create a new one.
Use of the API is subject to our Terms of Service and Usage Policy.