import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AURIKO_API_KEY,
baseURL: "https://api.auriko.ai/v1",
});
const response = await client.responses.create({
model: "gpt-4o",
input: "Extract contact info: John Doe, john@example.com, 555-0123",
text: {
format: {
type: "json_schema",
name: "contact_info",
strict: true,
schema: {
type: "object",
properties: {
name: { type: "string" },
email: { type: "string" },
phone: { type: "string" },
},
required: ["name", "email", "phone"],
additionalProperties: false,
},
},
},
});
console.log(response.output_text);