المطورون
انقل المساعد إلى تطبيقك أو عميل MCP أو موقعك. التكلفة في كل مكان مثل المحادثة.
POST/api/v1/conversations
بدء محادثة: { text, locale?, model?, tools? } — أنشئ بـ tools صورًا أو فيديو أو موسيقى أو صوتًا.
tools
طلب حقيقي: تُخصم تكلفة الرسالة من أرصدتك. (رصيد واحد)
الشيفرة
curl -X POST "https://bilgisam.com/api/v1/conversations" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"…","locale":"ar"}'نص الاستجابة
ستظهر الاستجابة هنا.
الوثائق
الوسائط المتعددة
أدوات المحادثة متاحة في API أيضًا: الصور والفيديو والموسيقى والصوت والبحث. أضفها بحقل tools؛ تعود الملفات المُنشأة في مصفوفة media بعنوان عام.
curl -X POST https://bilgisam.com/api/v1/conversations \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text": "a red fox in the snow, watercolor", "tools": ["generate_image"]}'
# GET /api/v1/conversations/{id}
{
"pending": false,
"generating": false,
"messages": [
{ "role": "assistant", "content": "…", "media": [
{ "name": "image.png", "type": "image/png", "url": "https://…/image.png" }
] }
]
}
# edit_image: upload the source, then attach it
curl -X POST https://bilgisam.com/api/v1/files -H "Authorization: Bearer sk_..." -F "file=@photo.jpg"
# → {"id": "…", "image": "https://…"}
curl -X POST https://bilgisam.com/api/v1/conversations -H "Authorization: Bearer sk_..." -H "Content-Type: application/json" -d '{"text": "make the background a sunset beach", "tools": ["edit_image"], "files": ["<file id>"]}'