Getting started
Quickstart
Make a governed chat-completion request in a few minutes.
This guide assumes your Deeplinq operator has given you:
- the HTTPS URL of a running engine;
- an engine-issued API key;
- access to at least one configured and priced model.
Set these values in your server-side runtime:
export DEEPLINQ_BASE_URL="https://api.example.com"
export DEEPLINQ_API_KEY="sk_dl_..."1. List available models
The models response is already filtered to the organization represented by your credential.
curl "$DEEPLINQ_BASE_URL/v1/models" \
-H "Authorization: Bearer $DEEPLINQ_API_KEY"2. Send a chat completion
Use a model returned by /v1/models, or use auto when your organization has
enabled intent-based routing.
curl "$DEEPLINQ_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $DEEPLINQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [
{
"role": "user",
"content": "Give me a concise explanation of hybrid retrieval."
}
]
}'The response uses the OpenAI chat-completions shape, so existing SDK response handling continues to work.
3. Use an SDK
Install the OpenAI SDK in your server project:
bun add openaiimport OpenAI from "openai"
const client = new OpenAI({
apiKey: process.env.DEEPLINQ_API_KEY,
baseURL: `${process.env.DEEPLINQ_BASE_URL}/v1`,
})
const completion = await client.chat.completions.create({
model: "auto",
messages: [
{
role: "user",
content: "Give me a concise explanation of hybrid retrieval.",
},
],
})
console.log(completion.choices[0]?.message.content)