#!/usr/bin/env node const testData = { characterName: "Jennie", actorName: "Actor Name", actorAge: 15, productionTitle: "Extra Credit", productionType: "Disney TV Movie Musical", roleSize: "Lead", genre: "Family/Fantasy Musical", storyline: "An unlikely group of four teens will have to step up to the plate when they are the only thing standing between their town and disaster. Will they be able to shed their family legacies and be the ones to save the day?", characterBreakdown: "Cool, funny, and a complete showboat. Underneath her humor, Jennie is afraid that she'll never live up to the expectations everyone has put on her because of her family legacy. Jennie is impulsive, empathetic, and always the first to step up for others, even when she's unsure of herself. Seeking singing and dancing ability and experience.", sceneText: `INT. SIDEKICK ACADEMY - MAGIC PRACTICUM CLASSROOM - DAY JENNIE Okay, you've got this. Just remember what you practiced - quick flick of your wrist, no hesitation. You can do this. MERI Someone's been working on her pep talks..? JENNIE Please, I was born a hype woman. MERI And I was born to do this -- Meri grins and flicks her wand, sending a bursts of magic at the mannequin. The CLASS OF STUDENTS GASP and APPLAUD. Jennie turns to Meri and they do their special HANDSHAKE/FIST BUMP. JENNIE Rockstar move. Meri takes her seat in the front row. Jennie moves to sit as well, hyping up other students as she goes. JENNIE Did you see my girl? Lola, you also crushed today. Coggy, nailed it. The other sidekicks-in-training revel in Jennie's praise and high-five her as she goes. COGGY Thanks to your help, J. JENNIE My dad's wisdom is available to all - genies love to share. MERI Genies love to showboat. Jennie shrugs and goes to take her seat next to Meri, when Professor Liv eyes her. PROFESSOR LIV Jennie, perhaps you'd like a turn. Jennie pauses halfway into her seat. JENNIE Me? PROFESSOR LIV Yes, you are very generous with your time coaching others, but you have yet to grant any wishes - and you only get three while training. Time to test one out. JENNIE Oh, thank you, Professor. But I practice with my dad all the time, I'm good. PROFESSOR LIV I insist. Jennie stiffens before she recovers with a smile. JENNIE Of course- your wish is my command. She stands, playing it off like this is a great idea. Meri raises her eyebrows, fully aware her friend is fronting. --- EXT. WILL'S HOUSE - CONTINUOUS WILL Do you want to tell me what's going on? JENNIE What's going on like, "what's up?" Or was there something specific you wanted to discuss? Will gives her the classic look - Don't mess with me, kid. JENNIE Okay fine, it started as a hunch but then Lou told me it was a fruit only grows in Cuzco so I thought-- WILL What does fruit have to do with your granted wish going sideways? Wait - what? Jennie realizes he means -- JENNIE Professor Liv called you. Will nods. Jennie exhales. JENNIE I dunno, Dad - it's like... I know the words, the moves, the steps. But when I go to put them together - my magic doesn't cooperate. WILL It takes time, kiddo. JENNIE But you'd already granted like a hundred wishes by the time you were my age. Everybody knows that - you're a legend.` }; async function testAPI() { console.log('Testing Prep101 API with Jennie data...\n'); try { const response = await fetch('https://prep101-api.vercel.app/api/clawdbot/generate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'clawdbot_sk_live_5928349283749238' }, body: JSON.stringify(testData) }); console.log('Status:', response.status); if (!response.ok) { const errorText = await response.text(); console.error('Error response:', errorText); process.exit(1); } const result = await response.json(); console.log('āœ… API call successful!'); console.log('HTML length:', result.guideHtml?.length || 0, 'characters'); console.log('Text length:', result.guidePlainText?.length || 0, 'characters'); // Save test output const fs = require('fs'); if (result.guideHtml) { fs.writeFileSync('/root/.openclaw/workspace/Projects/Casting/Output/Jennie_API_Test_Guide.html', result.guideHtml); console.log('\nāœ… Jennie guide saved to: Projects/Casting/Output/Jennie_API_Test_Guide.html'); } } catch (error) { console.error('āŒ API test failed:', error.message); process.exit(1); } } testAPI();