CosmicAC Logo

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


Initialize the inference service

npx cosmicac inference init

Follow 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?

On this page