Copy
import { glue } from "jsr:@streak-glue/runtime";
import OpenAI from "jsr:@openai/openai";
const openaiFetcher = glue.openai.createCredentialFetcher({
apiKeyName: "primary-openai",
});
glue.webhook.onPost(async () => {
const cred = await openaiFetcher.get();
const client = new OpenAI({ apiKey: cred.apiKey });
const response = await client.responses.create({
model: "gpt-5-mini",
input: "Write a short onboarding message for a new user.",
});
console.log(response.output_text);
});