Pengembang
Bawa asisten ke aplikasi, klien MCP, atau situs web Anda. Di mana pun biayanya sama dengan di obrolan.
POST/api/v1/conversations
Mulai obrolan: { text, locale?, model?, tools? } — dengan tools buat gambar, video, musik, atau suara.
tools
Permintaan nyata: pesan memotong kredit Anda. (1 kredit)
Kode
curl -X POST "https://bilgisam.com/api/v1/conversations" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"…","locale":"id"}'Isi respons
Respons akan muncul di sini.
Dokumentasi
Multimedia
Alat di obrolan juga ada di API: gambar, video, musik, suara, dan pencarian web. Tambahkan dengan kolom tools; file hasil kembali di larik media dengan URL publik.
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>"]}'