Skip to content

Make your first AI API request ​

Under AI Models & API, select a group and copy a model ID from the catalog. Create an API key with access to that group and model.

Copy the Base URL from the workspace. Set BOMU_BASE_URL and BOMU_API_KEY in your terminal, replace MODEL_ID below and send the request. Find the reply in choices[0].message.content and the charge in Usage.

bash
curl "${BOMU_BASE_URL%/}/chat/completions" \
  -H "Authorization: Bearer ${BOMU_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"model":"MODEL_ID","messages":[{"role":"user","content":"Hello"}]}'