{"openapi":"3.1.0","info":{"title":"Azamol Video Studio API","version":"1.0.0","description":"AI video, görsel ve ses üretim API'si — tek API, çok model. Tüm istekler kredi motorunu ve plan limitlerini panel ile aynı şekilde uygular (bypass yok).","contact":{"name":"Azamol Bilişim Danışmanlık","url":"https://azamol.ai","email":"info@azamol.ai"}},"servers":[{"url":"https://video.azamol.ai/api/v1","description":"Üretim"}],"security":[{"bearerAuth":[]}],"paths":{"/generate":{"post":{"summary":"Yeni üretim işi oluştur","description":"capability + model + input verir; iş kredi motoruna (rezervasyon) girer ve async kuyruğa alınır. Sonuç GET /jobs/{id} ile poll edilir (senkron bekleme YOK).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["capability","model","input"],"properties":{"capability":{"type":"string","example":"text_to_image"},"model":{"type":"string","example":"nano-banana-2"},"input":{"type":"object","additionalProperties":true,"example":{"prompt":"..."}},"priority":{"type":"string","enum":["normal","relax"],"default":"normal"},"team_id":{"type":"string","format":"uuid","nullable":true}}}}}},"responses":{"202":{"description":"İş sıraya alındı","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"durum":{"type":"string","example":"queued"}}}}}},"400":{"description":"Eksik alan veya bilinmeyen model (MODEL_BULUNAMADI)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}},"401":{"description":"Geçersiz API anahtarı (GECERSIZ_ANAHTAR)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}},"402":{"description":"Yetersiz kredi (KREDI_YETERSIZ)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}},"403":{"description":"Relax izni yok / takım üyeliği yok (RELAX_IZNI_YOK / TAKIM_UYELIGI_YOK)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}},"429":{"description":"Relax kuyruğu dolu (RELAX_KUYRUK_DOLU)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}}}}},"/jobs/{id}":{"get":{"summary":"İş durumunu sorgula","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"İş kaydı","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","reserved","running","succeeded","failed","canceled"]},"result_url":{"type":"string","nullable":true},"result_meta":{"type":"object","additionalProperties":true},"error":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time","nullable":true}}}}}},"401":{"description":"Geçersiz API anahtarı (GECERSIZ_ANAHTAR)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}},"404":{"description":"İş bulunamadı — veya başka kullanıcıya ait (IS_BULUNAMADI)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}}}}},"/models":{"get":{"summary":"Aktif model listesini getir","responses":{"200":{"description":"Model listesi","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string"},"model_string":{"type":"string"},"display_name":{"type":"string","nullable":true},"unit":{"type":"string"},"credits_per_unit":{"type":"number"}}}}}}}}},"401":{"description":"Geçersiz API anahtarı (GECERSIZ_ANAHTAR)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}}}}},"/credits":{"get":{"summary":"Kredi bakiyesini getir","responses":{"200":{"description":"Bakiye","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"number"}}}}}},"401":{"description":"Geçersiz API anahtarı (GECERSIZ_ANAHTAR)","content":{"application/json":{"schema":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API anahtarı — panelden (/panel/api) üretilir; `Authorization: Bearer <api_key>`."}},"schemas":{"Hata":{"type":"object","properties":{"hata":{"type":"string","description":"Türkçe hata mesajı."},"hata_kodu":{"type":"string","description":"Makine-okur hata kodu."}},"required":["hata","hata_kodu"]}}}}