OpenAI API
Access GPT-4 and other models for chat, completions, and embeddings to build AI-powered features.Key Features
- GPT-4 access
- Embeddings
- Fine-tuning
Setup
Create an API key
Go to platform.openai.com and create an API key from your account dashboard.
Store securely
Store your API key in environment variables (e.g.
OPENAI_API_KEY)—never commit it to version control.Features & Best Practices
Setup
Setup
- Create an API key at platform.openai.com; store it in env vars (e.g. OPENAI_API_KEY)—never commit it.
- Use the Chat Completions API for conversational AI; Structured Outputs for reliable JSON.
Models & usage
Models & usage
gpt-4ois fast and capable for most use cases;gpt-4o-miniis cheaper for high-volume tasks.- Embeddings (
text-embedding-3-small) for search, RAG, and similarity—key for hackathon demos.
Hackathon Tips
Quick tips for hackathons
Quick tips for hackathons
- Free tier credits are limited; monitor usage and switch to mini for non-critical calls.
- Use system prompts to define behavior; few-shot examples improve consistency for demos.
Resources
OpenAI API Quickstart
Official quickstart guide for the OpenAI API
Watch: OpenAI Responses API intro
Community tutorial on using the OpenAI API