Sviluppatori
Porta l’assistente nella tua app, nel tuo client MCP o sul tuo sito. Ovunque costa come nella chat.
POST/api/v1/conversations
Avvia una chat: { text, locale?, model?, tools? } — con tools crea immagini, video, musica o voce.
tools
Richiesta reale: il messaggio si paga con i tuoi crediti. (1 credito)
Codice
curl -X POST "https://bilgisam.com/api/v1/conversations" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"…","locale":"it"}'Corpo della risposta
La risposta apparirà qui.
Documentazione
Multimedia
Gli strumenti della chat sono anche nell’API: immagini, video, musica, sintesi vocale e ricerca web. Aggiungili con il campo tools; i file generati tornano nell’array media con URL pubblico.
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>"]}'