Quick Start · about 3 minutes
Protect your first LLM request.
Use the matching Interdict endpoint to preserve your provider's SDK and request shape. The example below is for OpenAI or xAI Chat Completions.
Create an Interdict API key
In your account, generate an Interdict API key. Store it as INTERDICT_API_KEY.
Add a provider key
Save a credential for OpenAI, Anthropic, Gemini, xAI/Grok, or Ollama Cloud in the account dashboard so Interdict can securely forward approved requests.
Use the matching provider endpoint
Use your Interdict key and the route for your provider. OpenAI and xAI keep their Chat Completions shape.
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.INTERDICT_API_KEY,
baseURL: 'https://www.interdictai.com/api/proxy/v1',
})
const completion = await client.chat.completions.create({
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: 'My SSN is 123-45-6789' }],
})Provider endpoint map
- OpenAI
https://www.interdictai.com/api/proxy/v1/chat/completionsChat Completions - Anthropic
https://www.interdictai.com/api/proxy/anthropic/v1/messagesMessages API - Gemini
https://www.interdictai.com/api/proxy/gemini/v1beta/models/{model}:generateContentGenerateContent or streamGenerateContent - xAI / Grok
https://www.interdictai.com/api/proxy/xai/v1/chat/completionsChat Completions - Ollama Cloud
https://www.interdictai.com/api/proxy/ollama/api/chatOllama chat API
Run the example above in your own application using fictional data, then inspect the response and your Interdict audit log. Your model provider may charge for the request. Never commit provider or Interdict keys to source control.
Back to account →