A web interface for interacting with OpenAI's latest models: SORA API for video generation and ChatGPT Pro for advanced language processing with vision support.
- Advanced language model with enhanced reasoning capabilities
- Vision support for image analysis and understanding
- File upload capability for multimodal interactions
- Chat interface for natural conversations
- Real-time responses with streaming support
- Context-aware conversations
- Text-to-video generation using state-of-the-art AI
- Simple prompt-based interface
- Real-time video preview
- An OpenAI API key with access to ChatGPT Pro and SORA models
- A modern web browser
- A local web server (optional, but recommended)
- Clone this repository:
git clone https://github.com/ellertsmari/openAISDK.git
cd openAISDK-
Open the website:
- Option 1: Simply open
index.htmlin your web browser - Option 2: Use a local server (recommended):
# Using Python python -m http.server 8000 # Using Node.js npx http-server
- Option 1: Simply open
-
Enter your OpenAI API key in the provided field
- Enter your API key and click "Save Key"
- Type your prompt in the ChatGPT Pro text area
- (Optional) Attach image files by clicking "📎 Attach Files" button
- Click "Send to ChatGPT Pro" or press Enter
- View the response in the chat interface
Vision Support: ChatGPT Pro supports image analysis. You can upload images (JPG, PNG, etc.) along with your prompt to ask questions about the images or get visual analysis.
- Enter your API key and click "Save Key"
- Describe the video you want to generate
- Click "Generate Video" or press Enter
- Wait for the video to be generated (typically 1-5 minutes)
- The app will automatically check the generation status every 5 seconds
- You'll see progress updates in the loading indicator
- Once complete, the video will be displayed with a download link
- Model ID:
gpt-5-pro - Capabilities: Advanced reasoning, complex problem-solving, enhanced context understanding, vision and image analysis
- Vision Support: Can analyze images, understand visual content, read text from images, and provide detailed descriptions
- Use Cases: Code generation, analysis, creative writing, research assistance, image analysis, visual Q&A
- File Support: Images (JPEG, PNG, GIF, WebP) up to 20MB per image
- Model ID:
sora-turbo-2024-12-01 - Capabilities: Text-to-video generation with advanced understanding of physics and motion
- Parameters:
model: The model identifier (required)prompt: Text description of the video (required)
- Documentation: Video Generation Guide
openAISDK/
├── index.html # Main HTML structure
├── styles.css # Styling and layout
├── app.js # JavaScript logic and API integration
└── README.md # Documentation
The application uses the OpenAI SDK through direct REST API calls:
- ChatGPT Pro:
https://api.openai.com/v1/chat/completions- Supports multimodal input (text + images) via base64 encoding
- Model:
gpt-5-pro
- SORA Video Generation:
https://api.openai.com/v1/videos(POST) - SORA Status Check:
https://api.openai.com/v1/videos/{video_id}(GET) - SORA Video Content:
https://api.openai.com/v1/videos/{video_id}/content(GET)
- Submit video generation request
- Receive job ID with status "queued"
- Poll status endpoint every 5 seconds (max 60 attempts)
- When status becomes "completed", retrieve video content from
/contentendpoint - Display video using blob URL
For more details, see the OpenAI Video Generation Documentation.
- API keys are stored in sessionStorage (cleared when browser is closed)
- Never commit API keys to version control
- Consider implementing backend proxy for production use
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Opera 76+
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project for your own purposes.
- Built with OpenAI SDK
- Announced at OpenAI Dev Day
- Supports the latest SORA and ChatGPT Pro models with vision capabilities
- Verify your API key is correct
- Check that you have access to ChatGPT Pro and SORA models
- Ensure your API key has sufficient credits
- SORA API may require beta enrollment or special access
- For vision features, ensure your API plan supports multimodal inputs
- Video generation is asynchronous: The app will automatically poll for completion (up to 5 minutes)
- Watch the loading indicator for status updates during generation
- SORA API may require special access or beta enrollment
- Check the OpenAI Video Generation Documentation for the latest details
- Verify the response format matches the expected structure
- Ensure your API key has access to video generation features
- Use a local web server instead of opening the file directly
- Consider implementing a backend proxy for production
For issues, questions, or contributions, please visit the GitHub repository.