on "v0-sdk": "^0.0.9"
i generate an iframe url using code below. however, the iframe url generated always returns a 404. example: iframe link
can someone please assist?
// Create a chat using the v0 SDK const chatResponse = await v0.chats.create({ message: `Create a mobile app UI with React Native/React that looks native. ${prompt}. Make it mobile-first, touch-friendly, with proper spacing for mobile devices.`, system: "You are an expert mobile app developer specializing in React Native and mobile UI/UX design. Create beautiful, native-looking mobile interfaces.", chatPrivacy: "public", modelConfiguration: { modelId: "v0-1.5-md", imageGenerations: false, }, });
console.log("chatResponse xxx", chatResponse);
// Get the full chat details to access messages const chat = await v0.chats.getById({ chatId: chatResponse.id });
console.log("chat xxx", chat);
// Get the latest version ID from the chat const latestMessage = chat.messages[chat.messages.length - 1]; const versionId = latestMessage.id;
// Get the iframe URL for live preview const iframe = await v0.chats.findIframe({ chatId: chat.id, versionId: versionId, });
console.log("iframe xxx", iframe);