Get started with the Aiproxy control plane in under 10 minutes.
Sign up for a free account at dashboard. No credit card required.
Aiproxy provisions a CLIProxyAPIPlus-backed runtime for your workspace, then lets you connect providers through the dashboard.
Create a tenant API key that routes into your workspace runtime.
Use the OpenAI SDK with your Aiproxy key after provider onboarding is complete:
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.AIPROXY_KEY,
baseURL: 'https://YOUR_DOMAIN/api/proxy'
})
const response = await client.chat.completions.create({
model: 'gpt-4',
messages: [
{ role: 'user', content: 'Hello, world!' }
]
})
console.log(response.choices[0].message.content)Aiproxy uses API keys for authentication. Include your key in the Authorization header:
Authorization: Bearer YOUR_AIPROXY_KEY
Aiproxy inherits provider breadth from CLIProxyAPIPlus. The control plane manages onboarding, entitlement, and runtime state for those providers.
Provider connection is managed through your workspace runtime and surfaced through the Aiproxy control plane.
Provider connection is managed through your workspace runtime and surfaced through the Aiproxy control plane.
Provider connection is managed through your workspace runtime and surfaced through the Aiproxy control plane.
Provider connection is managed through your workspace runtime and surfaced through the Aiproxy control plane.
const stream = await client.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Tell me a story' }],
stream: true
})
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || '')
}try {
const response = await client.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Hello!' }]
})
} catch (error) {
if (error.status === 429) {
console.error('Rate limit exceeded')
} else {
console.error('API error:', error.message)
}
}