YZ Ajanı API
YZ destekli akıllı asistan, içerik üretimi, web araması ve görsel oluşturma özelliklerini RESTful API ile uygulamalarınıza entegre edin.
Postman Koleksiyonu
Kolay test için endpoint'leri doğrudan Postman'a aktarın
YZ Ajanı API ile Başlarken
YZ destekli akıllı asistan, içerik üretimi ve web aramasını uygulamalarınıza entegre edin
Kimlik Doğrulama
Tüm API istekleri, Bearer token formatını kullanarak Authorization başlığında API anahtarınızı içermelidir.
Authorization: Bearer YOUR_API_KEYKredi Maliyeti
Her 10 API isteği hesap bakiyenizden 1 kredi tüketir.
Mevcut Endpointler
Ajan İsteği Oluştur
YZ ajanına bir sorgu gönderin ve takip için benzersiz bir istek kimliği alın.
POST
/api/v1/agentÖrnek İstek
curl -X POST http://localhost:11000/api/v1/agent \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "What is the latest news about AI?",
"language": "en",
"fileUrl": "https://example.com/photo.jpg",
"messageHistory": [
{ "role": "user", "content": "Tell me about AI" },
{ "role": "assistant", "content": "AI refers to..." }
]
}'Örnek Yanıt
{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"message": "Request queued successfully. Use GET /api/v1/agent/:requestId to check status."
}İstek Sonucunu Al
UUID kullanarak daha önce oluşturulmuş bir isteğin durumunu ve yanıtını alın.
GET
/api/v1/agent/:uuidÖrnek İstek
curl -X GET http://localhost:11000/api/v1/agent/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_API_KEY"Örnek Yanıt
{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"createdAt": "2026-01-25T10:30:00Z",
"completedAt": "2026-01-25T10:30:15Z",
"response": {
"message": "The latest AI developments include...",
"conversationUuid": "...",
"selectedMcps": ["web-search"],
"executionTime": 1500
},
"thinking": [...],
"selectedMcps": ["web-search"],
"safetyCheck": { "safety": 1.0, "requestedTools": {...} },
"usage": { "promptTokens": 150, "completionTokens": 200, "totalTokens": 350 },
"credit": { "used": 0.1, "cost": 0.01 }
}