cURL & HTTP
Ingate works with any HTTP client. No SDK required. Just change the URL and add a header.
Basic Request
bash
curl https://api.ingateai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-Ingate-Provider: openai" \
-H "X-Ingate-Key: sk-ingate-your-key" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "What is an AI gateway?"}]
}'Streaming
bash
curl --no-buffer https://api.ingateai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-Ingate-Provider: openai" \
-H "X-Ingate-Key: sk-ingate-your-key" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Tell me a story"}],
"stream": true
}'Anthropic (Native Format)
bash
curl https://api.ingateai.com/v1/messages \
-H "Content-Type: application/json" \
-H "X-Ingate-Provider: anthropic" \
-H "X-Ingate-Key: sk-ingate-your-key" \
-d '{
"model": "claude-3-haiku-20240307",
"max_tokens": 100,
"messages": [{"role": "user", "content": "Hello, Claude!"}]
}'Embeddings
bash
curl https://api.ingateai.com/v1/embeddings \
-H "Content-Type: application/json" \
-H "X-Ingate-Provider: openai" \
-H "X-Ingate-Key: sk-ingate-your-key" \
-d '{
"model": "text-embedding-3-small",
"input": "Ingate is a universal AI gateway"
}'With Format Translation
Send OpenAI format, target Anthropic:
bash
curl https://api.ingateai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-Ingate-Provider: anthropic" \
-H "X-Ingate-Translate: true" \
-H "X-Ingate-Key: sk-ingate-your-key" \
-d '{"model":"claude-3-haiku-20240307","messages":[{"role":"user","content":"Hello"}]}'View Logs
bash
# All recent logs
curl https://api.ingateai.com/api/logs \
-H "X-Ingate-Key: sk-ingate-your-key" | jq .
# Filter by provider
curl "https://api.ingateai.com/api/logs?provider=openai" \
-H "X-Ingate-Key: sk-ingate-your-key" | jq .Other Languages
Universal HTTP
Since Ingate is a standard HTTP proxy, any language that can make HTTP requests works: Go, Java, Ruby, PHP, Rust, C#, and more. The pattern is always the same: change the base URL and add the
X-Ingate-Provider header.