Start
Make your first request.
Verify your key and the complete public API path before configuring an agent or application. You only need a CostIQ-issued key and cURL.
Before you begin
Ask your CostIQ administrator for a key created specifically for you or the service you are connecting. Do not share a credential across people or environments.
Configure your shell
The silent prompt keeps the key out of your terminal history and screen.
export COSTIQ_BASE_URL=https://inference.costiq.xyz/v1
export COSTIQ_MODEL=general-fast
printf 'CostIQ API key: ' >&2
read -r -s COSTIQ_API_KEY && printf '\n' >&2
export COSTIQ_API_KEYList available models
A healthy, authorized request returns general-fast in the response data.
curl "$COSTIQ_BASE_URL/models" \
-H "Authorization: Bearer $COSTIQ_API_KEY"Create a response
Use the native Responses API for agentic and tool-using clients.
curl "$COSTIQ_BASE_URL/responses" \
-H "Authorization: Bearer $COSTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "general-fast",
"input": "Explain this in one sentence.",
"store": false
}'Stream a response
Set stream to true and consume typed server-sent events untilresponse.completed or an error event.
curl -N "$COSTIQ_BASE_URL/responses" \
-H "Authorization: Bearer $COSTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "general-fast",
"input": "Write a haiku.",
"store": false,
"stream": true
}'Choose a client
If all four checks pass, continue with the verified Codexor OpenCode setup. Python and TypeScript examples are available on the same page. Qualify any other agent against the published compatibility contract before production use.