Deweloperzy
Przenieś asystenta do swojej aplikacji, klienta MCP lub strony. Wszędzie kosztuje tyle samo co w czacie.
POST/api/v1/conversations
Rozpocznij czat: { text, locale?, model?, tools? } — przez tools twórz obrazy, wideo, muzykę lub mowę.
tools
Prawdziwe żądanie: wiadomość zużywa Twoje kredyty. (1 kredyt)
Kod
curl -X POST "https://bilgisam.com/api/v1/conversations" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"…","locale":"pl"}'Treść odpowiedzi
Tu pojawi się odpowiedź.
Dokumentacja
Multimedia
Narzędzia z czatu są też w API: obraz, wideo, muzyka, mowa i wyszukiwanie. Dodaj je polem tools; wygenerowane pliki wracają w tablicy media z publicznym adresem.
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>"]}'