Développeurs
Intégrez l’assistant à votre app, à votre client MCP ou à votre site. Partout, le coût est le même que dans le chat.
POST/api/v1/conversations
Démarrer une discussion : { text, locale?, model?, tools? } — avec tools, créez images, vidéo, musique ou voix.
tools
Requête réelle : le message est débité de vos crédits. (1 crédit)
Code
curl -X POST "https://bilgisam.com/api/v1/conversations" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"…","locale":"fr"}'Corps de la réponse
La réponse s’affichera ici.
Documentation
Multimédia
Les outils du chat sont aussi dans l’API : image, vidéo, musique, synthèse vocale et recherche web. Ajoutez-les avec le champ tools ; les fichiers générés reviennent dans le tableau media avec une URL publique.
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>"]}'