How to Connect to a Managed Inference API
Send inference requests to your managed inference service. Once connected, you can run chat completions and stream responses.
Prerequisites
- Managed inference API key (see Managed Inference Job)
- CosmicAC CLI installed (see Installation)
Initialize the inference service
npx cosmicac inference initFollow the prompts to configure your connection:
- Protocol — Select the inference protocol (default: HTTP)
- API key — Enter your API key (must start with
ttr-proj-) - Default model — Select a model from the available list
Once configured, you can run inference commands without providing the key each time.
Send a request
npx cosmicac inference chat --message "Explain quantum computing."A successful response confirms your connection.
What's next?
- CLI Commands — Full command reference with output examples.
- Managed Inference I/O Specs — Review input modes, response formats, and API schemas.