Integrasikan kekuatan AI ke aplikasi Anda dengan API yang mudah digunakan dan dokumentasi lengkap
Dapatkan API key Anda dari dashboard untuk mulai menggunakan API
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.jagad.ai/v1/modelsSemua endpoint API menggunakan base URL berikut
https://api.jagad.ai/v1/api/v1/chat/completionsGenerate chat completions using any of our supported AI models
{
"model": "openai/gpt-4",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
],
"temperature": 0.7,
"max_tokens": 1000
}{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"model": "openai/gpt-4",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm doing well, thank you for asking. How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}/api/v1/modelsGet a list of available AI models
{}{
"data": [
{
"id": "openai/gpt-4",
"name": "GPT-4",
"description": "Most capable GPT-4 model",
"context_length": 8192,
"pricing": {
"prompt": 0.00003,
"completion": 0.00006
}
}
]
}/api/v1/memoryCreate, update, or retrieve memory for enhanced context
{
"type": "global",
"content": "User prefers responses in Indonesian language",
"chat_room_id": "optional"
}{
"id": "mem_123",
"type": "global",
"content": "User prefers responses in Indonesian language",
"created_at": "2024-01-01T00:00:00Z"
}Paket gratis
Paket profesional
Paket tim
Tim support kami siap membantu Anda mengintegrasikan API Jagad.ai