Get Started
Quickstart
Get started with Auto in minutes
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get started with Auto in minutes
const openai = new OpenAI({
// #1: Switch to the Auto API key
apiKey: process.env.AUTO_API_KEY,
// #2: Add the Auto base URL
baseURL: "https://api.auto.venki.dev/api/v1",
// #3: Add the OpenAI API key - optional, see Bringing Your Own Keys for more details
defaultHeaders: {
"X-OpenAI-Api-Key": process.env.OPENAI_API_KEY,
},
});
const chatResponse = await openai.chat.completions.create(
{
model: "gpt-4o"
messages: ...,
},
{
// #4: Add a prompt ID
headers: {
"X-Auto-Prompt-Id": "summarize-webpage",
},
}
);
// #1: Switch to the Auto base URL
const response = await fetch("https://api.auto.venki.dev/api/v1/chat/completions", {
method: "POST",
headers: {
// #2: Switch to the Auto API key
"Authorization": `Bearer ${process.env.AUTO_API_KEY}`,
"Content-Type": "application/json",
// #3: Add the OpenAI API key - optional, see Bringing Your Own Keys for more details
"X-OpenAI-Api-Key": process.env.OPENAI_API_KEY,
// #4: Add a prompt ID
"X-Auto-Prompt-Id": "summarize-webpage"
},
body: JSON.stringify({
model: "gpt-4o",
messages: ...,
})
});
const chatResponse = await response.json();
const openai = createOpenAI({
// #1: Switch to the Auto API key
apiKey: process.env.AUTO_API_KEY,
// #2: Add the Auto base URL
baseURL: "https://api.auto.venki.dev/api/v1",
// #3: Add the OpenAI API key - optional, see Bringing Your Own Keys for more details
headers: {
"X-OpenAI-Api-Key": process.env.OPENAI_API_KEY,
},
});
const { text } = await generateText({
model: openai('gpt-4o'),
prompt: '...',
headers: {
"X-Auto-Prompt-Id": "summarize-webpage"
}
});
