Anomic AI

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

  1. Create an account or sign in.
  2. Open Settings → Developer and click Create new key. Copy the key — it is shown only once.
  3. 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

FieldDescription
messagesRequired. Array of { role, content } with role system, user or assistant. The last message must be from the user. Up to 50 messages.
modelOptional. Defaults to anomic-bfsi. See Models.
temperatureOptional, 0–2. Defaults to 0.4.
max_tokensOptional. Maximum reply length, up to 4096 tokens. Defaults to 2048.
streamOptional. 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 credit
  • anomic-bfsi/retail_bankingRetail Banking — Accounts, personal loans, cards, onboarding
  • anomic-bfsi/payments_cardsPayments & Cards — Cards, gateways, payment rails, settlements
  • anomic-bfsi/core_banking_digital_channelsCore Banking & Digital Channels — Core banking systems and digital channels
  • anomic-bfsi/wealth_asset_managementInvestment Banking — M&A, capital markets, IPOs, securities
  • anomic-bfsi/kyc_aml_complianceKYC/AML & Compliance — KYC, AML screening, compliance reporting
  • anomic-bfsi/insuranceInsurance — Policies, underwriting, claims, compliance
  • anomic-bfsi/lending_nbfcLending / NBFC — Loan origination, underwriting, collections
  • anomic-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" } }.

StatusCodeMeaning
400invalid_request_error / model_not_foundThe body is malformed, or the model or section id is unknown.
401invalid_api_keyThe key is missing, wrong, or has been revoked.
403account_deactivatedThe account that owns the key is deactivated.
429rate_limit_exceededMore than 60 requests in a minute on one key. Wait for Retry-After seconds.
429insufficient_quotaYour plan’s request allowance is used up. Upgrade to continue.
502upstream_errorThe 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.