Quick start

Integrate CoreCtic AI in under 3 minutes. No change to your application logic — a single URL swap is enough.

Full OpenAI compatibility
CoreCtic AI implements the OpenAI v1 spec at 100%. Any code that works with the official OpenAI SDK works with CoreCtic AI without any other change.
Coding with an AI? Let it integrate CoreCtic for you.
Give this file as context to Claude Code, Cursor or ChatGPT — it contains everything the assistant needs to know to hook your application up to CoreCtic.
corectic-llm-guide.md

Setup in 3 steps

1
Create your account & grab your API key

Go to corecticai.com/auth and create your account. An API key is generated automatically — it is always prefixed pl_.

You will find it in Dashboard → Settings → API Keys. Copy it and store it in an environment variable.

bash
# Add to your .env or .env.local
CORECTIC_API_KEY="pl_xxxxxxxxxxxxxxxxxxxx"
2
Replace the base URL

Only one parameter changes. Your api_key becomes your CoreCtic key (pl_...) and your base_url points to our proxy:

Python (before / after)
# Before — direct OpenAI call
from openai import OpenAI
client = OpenAI(api_key="sk-proj-...")

# After — via CoreCtic AI
from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["CORECTIC_API_KEY"],   # pl_...
    base_url="https://api.corecticai.com/v1",
)
Node.js (before / after)
// Before
import OpenAI from 'openai';
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });

// After
import OpenAI from 'openai';
const client = new OpenAI({
  apiKey: process.env.CORECTIC_API_KEY,   // pl_...
  baseURL: 'https://api.corecticai.com/v1',
});
3
Send your first request

All your existing code works as-is. The request is proxied, logged and optimized by the semantic cache:

Python
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Explain semantic caching in 2 sentences."}]
)
print(response.choices[0].message.content)

# The X-Cache response header indicates:
#   HIT  → served from the cache (0 tokens billed)
#   MISS → API call made (tokens counted)

Verify the integration

After your first request, open the Dashboard. You should see:

  • The request appear in Request logs with model, tokens and cost
  • The cache status switch to HIT from the second similar request
  • P50/P95 latency metrics updated in real time

Common troubleshooting

ErrorCauseSolution
401 UnauthorizedInvalid or missing API keyCheck the key starts with pl_ and is correctly passed as api_key
403 ForbiddenPlan too low for this providerCheck your plan restrictions in Dashboard → Plans
422 UnprocessableUnknown modelCheck the exact model spelling (see Providers section)
429 Too Many RequestsRate limit reachedStandard plan: 60 req/min. Pro: 300 req/min. Premium: unlimited
502 Bad GatewayThe AI provider is failingRetry or switch models. CoreCtic AI logs all upstream errors.

Next steps

API integration
Streaming, env variables, custom headers
Semantic cache
Understand and monitor the cache
Providers
All supported models
Analytics
Metrics, costs and PDF export