OpenAI configuration
Configuration for OpenAI endpoints
Configuration
The Velvet gateway domain is gateway.usevelvet.com
.
Add the baseURL
for Velvet's gateway URL.
https://gateway.usevelvet.com/api/openai/v1/
Here's an example code snippet for JavaScript.
import OpenAI from "openai";
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: "https://gateway.usevelvet.com/api/openai/v1/",
defaultHeaders: {
"velvet-auth": process.env.VELVET_API_KEY,
},
});
Updated 28 days ago