Berita
Latest news and updates from JeromeGPT
API Documentation
Complete guide to using JeromeGPT API with examples and best practices
Introduction
Welcome to the JeromeGPT API documentation. JeromeGPT is a powerful AI assistant API that provides natural language processing, chat capabilities, image generation, and more.
Base URL: https://api.jeromegpt.com/v1
Default Format: All responses are in JSON format
Getting Started
To get started with JeromeGPT API, you'll need:
- An API key (available in your dashboard)
- Make authenticated requests with your API key
- Use the appropriate endpoint for your needs
Authentication
All API requests require authentication using your API key. Include your API key in the request headers.
GET /v1/chat
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Getting Your API Key
You can obtain your API key from the dashboard after signing up. Premium users get higher rate limits and access to all features.
Endpoints
JeromeGPT provides several endpoints for different AI capabilities:
| Endpoint | Method | Description |
|---|---|---|
/chat |
POST | Chat completion with AI assistant |
/images/generate |
POST | Generate images from text prompts |
/text/analyze |
POST | Text analysis and processing |
/models |
GET | List available AI models |
/usage |
GET | Get API usage statistics |
Chat API
The Chat API allows you to have conversations with JeromeGPT AI assistant.
Request Example
{
"messages": [
{
"role": "user",
"content": "Hello, who are you?"
}
],
"model": "jeromegpt-4",
"temperature": 0.7,
"max_tokens": 500
}
Response Example
{
"id": "chat_12345",
"object": "chat.completion",
"created": 1677652288,
"model": "jeromegpt-4",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm JeromeGPT, an AI assistant created to help you with various tasks. How can I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 25,
"total_tokens": 35
}
}
Code Examples
JavaScript Fetch
const response = await fetch('https://api.jeromegpt.com/v1/chat', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
messages: [{ role: 'user', content: 'Hello!' }],
model: 'jeromegpt-4'
})
});
const data = await response.json();
console.log(data.choices[0].message.content);
Python Requests
import requests
response = requests.post(
'https://api.jeromegpt.com/v1/chat',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'messages': [{'role': 'user', 'content': 'Hello!'}],
'model': 'jeromegpt-4'
}
)
print(response.json()['choices'][0]['message']['content'])
Note: For complete documentation with all endpoints and parameters, download our PDF guide or contact support.
Settings
Manage your account, API keys, and preferences with advanced controls
API Keys Management
| Key | Created | Actions |
|---|