Integration GuideAuthenticationEndpoint conventionsModelsErrors
StarmodelStarmodel
Get StartedAPI Reference

Integration Guide

1. Create an API Key

Create a key on the API Key page of the console. The key is shown only once — save it in a server-side environment variable and never put it in browser code.

export API_KEY="sk-..."

2. Configure the Base URL

The OpenAI-compatible gateway URL of Starmodel is:

https://api.starmodel.ai/v1

3. Make your first request

curl https://api.starmodel.ai/v1/chat/completions \  -H "Authorization: Bearer $API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "your model ID",    "messages": [      { "role": "user", "content": "Hello" }    ]  }'

4. Check usage and billing

After a call, view requests, tokens, billing and balance changes on the console Logs, Credit and Subscription & Usage pages.

On this page

1. Create an API Key2. Configure the Base URL3. Make your first request4. Check usage and billing
export API_KEY="sk-..."
https://api.starmodel.ai/v1
curl https://api.starmodel.ai/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your model ID",
    "messages": [
      { "role": "user", "content": "Hello" }
    ]
  }'