Skip to main content
Glama
openai_integration.js811 B
import OpenAI from "openai"; const openai = new OpenAI(); async function main() { const response = await openai.chat.completions.create({ model: "gpt-4o", messages: [{ role: "user", content: "Transcribe and analyze: https://www.youtube.com/watch?v=example" }], tools: [ { type: "function", function: { name: "youtube2text", description: "Get the transcript of a YouTube video.", parameters: { type: "object", properties: { url: { type: "string", description: "The URL of the YouTube video.", }, }, required: ["url"], }, }, }, ], tool_choice: "auto", }); console.log(response.choices[0]); } main();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dm-nosov/youtube2text'

If you have feedback or need assistance with the MCP directory API, please join our Discord server