All Guides
ChatGPT API Setup
Integrate OpenAI ChatGPT API into your project. Getting API keys and sending your first request.
Intermediate20 min
Setup Steps
1. Create an account at https://platform.openai.com
2. Generate a new API key from the API Keys page
3. Install the openai package for Python:
pip install openai4. Set your API key as an environment variable:
export OPENAI_API_KEY="sk-..."5. Send your first API request:
python
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)6. For Node.js:
npm install openai7. JavaScript example:
javascript
import OpenAI from 'openai';
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [{role: "user", content: "Hello!"}]
});
console.log(completion.choices[0].message.content);Related Guides
Claude Code Setup
Install Anthropic Claude Code CLI on your server or PC. API key configuration and basic commands.
Google Gemini API Setup
Set up Google Gemini (formerly Bard) API and use it in your projects.
Midjourney Usage Guide
Create AI-powered images with Midjourney. Step-by-step guide for Discord usage.
Stable Diffusion Local Setup
Install Stable Diffusion on your computer. Usage with AUTOMATIC1111 WebUI.