// Lists all models visible to the key. No secrets in this file; key comes from OPENAI_API_KEY env. import OpenAI from "openai"; const client = new OpenAI(); const out: any[] = []; for await (const m of client.models.list()) out.push(m); out.sort((a, b) => a.id.localeCompare(b.id)); console.log(JSON.stringify({ count: out.length, sample: out[0], models: out.map(m => ({ id: m.id, created: new Date(m.created * 1000).toISOString().slice(0, 10), owned_by: m.owned_by })) }, null, 1));