開発者
アシスタントをあなたのアプリ、MCP クライアント、Web サイトへ。どこでも料金はチャットと同じです。
POST/api/v1/conversations
会話を開始: { text, locale?, model?, tools? } — tools で画像、動画、音楽、音声を生成。
tools
実際のリクエストです: メッセージ料金がクレジットから差し引かれます。 (1 クレジット)
コード
curl -X POST "https://bilgisam.com/api/v1/conversations" \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"…","locale":"ja"}'レスポンス本文
ここにレスポンスが表示されます。
ドキュメント
マルチメディア
チャットのツールは API でも使えます: 画像、動画、音楽、音声合成、ウェブ検索。tools フィールドで指定すると、生成ファイルが公開 URL 付きで media 配列に返ります。
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>"]}'