Build an AI application
Integrate models and AI workflows through the BSQAI API and operate the result.
This path is for AI engineers, software engineers, and solution teams building an application on BullSequana AI.
Outcome
You can authenticate to the BSQAI API, make a model request, add the capabilities required by the use case, deploy the application, and retain enough telemetry to operate it.
1. Choose the smallest useful application shape
| Need | Start with |
|---|---|
| text generation or transformation | model access through the BSQAI API, with the Responses or Chat Completions API |
| answers grounded in organizational content | model access plus RAG |
| answers or extraction from files | files uploaded through the Files API and queried with the Responses API file_search tool; see RAG and Citations from file search |
| tools and multi-step actions | an Agent or Connectors through the Responses API |
| speech input or output | Build voice conversations |
| scores from a classic machine learning model | Use predictive models via API |
Build one complete request before combining multiple capability areas.
2. Establish authentication
Use a user token for interactive user-delegated behavior and a scoped API key for application-to-application model calls. Give the key only the permissions its requests need and, when you belong to a group, the team that funds its usage. Preserve the tenant and team boundary of the caller.
Service-account tokens are accepted only by the MLflow operations of the BSQAI API, not by the model, chat, or voice endpoints. See Create and use an API key and Manage service accounts.
Use local models via API documents base URLs, credentials, model discovery, the Responses API, and client configuration.
3. Discover and call a model
Do not hard-code an internal serving endpoint. Discover the model names exposed through the BSQAI API, select one appropriate for the workload, and implement request timeout and error handling.
The model list holds only the models the caller may use. A model without a Can use rule for the key's owner answers 404 model_not_found, so request model access before go-live.
Use Model as a Service for model lifecycle context and BSQAI API for the product-facing integration boundary.
4. Add knowledge, documents, or tools
For RAG, define source ownership, ingestion, chunking, embedding, retrieval, citations, and permission behavior. For document processing, separate synchronous application requests from long-running processing jobs. For tools, constrain which actions the calling identity can perform and retain an audit trail.
Add only the capability required by the use case; each additional integration expands the security and operational boundary.
5. Deploy the application
Deploy apps on the platform covers packaging, runtime configuration, identity, network exposure, health checks, and GitOps delivery.
Your deployment definition should include:
- immutable application image and version
- non-secret configuration separated from credentials
- resource requests and limits
- startup, readiness, and liveness behavior
- network and ingress requirements
- telemetry and an owned rollback path
6. Operate the result
Measure request rate, latency, errors, model behavior, retrieval quality, and downstream dependency failures. Keep application telemetry tenant-aware without recording prompts, retrieved content, or responses unless the approved use case explicitly requires it.
Watch the application's consumption. My usage breaks your usage down by API key and by application. The tenant's Analytics also breaks it down by group, the team each key is bound to. A reached user or team cap refuses new calls with 429 usage_cap_reached, so ask the tenant administrator to set a cap that fits the application's key. See Track usage and monthly caps.
Use Troubleshooting for common integration failures and Foundation observability for the platform signal path.
You are done when
- the application uses the BSQAI API rather than an internal component endpoint
- authentication and tenant boundaries are tested
- the key's permissions, team, model access, and monthly cap are reviewed
- one end-to-end user outcome works in the target environment
- failures are visible and actionable
- deployment, rollback, and ownership are documented