Desenvolvedores
Leve o assistente para seu app, seu cliente MCP ou seu site. Em todo lugar custa o mesmo que no chat.
POST/api/v1/conversations
Iniciar conversa: { text, locale?, model?, tools? } — com tools gere imagens, vídeo, música ou fala.
tools
Requisição real: a mensagem é cobrada dos seus créditos. (1 crédito)
Código
curl -X POST "https://bilgisam.com/api/v1/conversations" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"…","locale":"pt"}'Corpo da resposta
A resposta aparecerá aqui.
Documentação
Multimídia
As ferramentas do chat também estão na API: imagem, vídeo, música, fala e busca na web. Adicione-as com o campo tools; os arquivos gerados voltam no array media com URL pública.
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>"]}'