Updated · SI-API

DEVELOPER GUIDES

API setup

Set your SI-API key, choose a model ID, and send requests using Chat Completions, Responses, or Messages.

1. Get your API key

Create or copy your SI-API key from API keys, then replace the placeholder below. API keys →

Environment variable
export SIAPI_API_KEY="YOUR_SIAPI_API_KEY"

Before sending a request, check your available funding and billing preference. Billing basics →

2. Set the base URL

Base URL
https://siapi.ai/v1

3. Send a request

Chat Completions · curl
curl https://siapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $SIAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "deepseek-flash",
  "messages": [
    {
      "role": "user",
      "content": "Explain binary search in one paragraph."
    }
  ],
  "max_tokens": 256
}'

The response contains generated text. View token usage and charges in Usage.

4. Switch models with the same key

Choose another model in the example above and copy the updated request. Keep the same base URL and key; replace the model field with the exact catalog ID. Your current example uses deepseek-flash.

Recheck supported reasoning levels, input types and output limits for the new model. Client-defined tools also need to match the protocol you selected. Model capabilities →

Moving from another API provider

Keep your existing application structure where its client supports a custom provider. Work through these settings before moving a production workflow.

Migration settings to check
SettingWhat to change or verify
Protocol and base URLOpenAI SDKs: use https://siapi.ai/v1 with Chat Completions or Responses. Anthropic SDKs: use https://siapi.ai with Messages. Let the SDK append the request path once.
AuthenticationReplace the previous provider’s key with your SI-API key. OpenAI requests use Authorization: Bearer; Messages requests use x-api-key and the anthropic-version header shown in the example.
Model IDUse a catalog ID such as deepseek-flash or glm-5.3-flash. Provider prefixes and model aliases from your previous service may differ. Model IDs →
Model-specific parametersCheck thinking settings, image input, output limits and tool schemas. Do not carry unsupported parameters over from another model or provider. Model configuration
Client and Agent settingsFor coding tools, use the matching all-model configuration rather than replacing values in an unrelated provider profile. Follow the guide’s launch, model-switching and effort instructions. Agent guides

Verify a small request first

Start with a short text request and a small output limit. Confirm the response format, then test streaming and any tools your application uses. Check the recorded model, tokens and charges in Usage before increasing traffic.

A client must support custom endpoints to connect directly. Some clients need their own provider configuration; changing the URL alone does not guarantee compatibility. Connection not working?

Models and pricing · Connection not working?