Quickstart

Create an API key, copy a model ID, and make your first Oimi API request.

Welcome to Oimi API

Oimi API gives developers a unified entry point for model calls. You can create API keys in the console, review available models and pricing, and send requests through OpenAI-compatible endpoints.

If your application already uses the OpenAI SDK, you usually only need to replace the base URL, API key, and model ID. Claude Messages and Gemini generateContent endpoints are also available. The actual callable models are based on the Models page in your console.

What You Can Do

  • Create and manage API keys
  • Call available models with the OpenAI-compatible SDK
  • View model IDs, pricing, multipliers, and model variants in Models
  • Test models in Experience Center
  • Review call records by time, model, API key, or request ID in Usage
  • Check credit balance, recharge entry, and billing records in Costs
  • Enable, disable, delete, or update API key quota and model variant

First Request

1. Create an API Key

After signing in, open API Keys and click Create API key. Add a note that helps you identify the key, such as Production app.

The full key is shown only once. After closing the dialog, the console only shows a masked key. Copy it immediately and store it in a server-side environment variable.

2. Check the Base URL

Open the API access section on the console overview page to confirm your service URL. The examples use https://api.oimi.xin; use the Base URL shown in your console for production integration.

SDK integrations usually use the /v1 path:

https://api.oimi.xin/v1

3. Copy a Model ID

Open Models and copy the model ID you want to call. The model list shows the models, pricing, and model variants available to your account.

4. Send a Request

curl https://api.oimi.xin/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "model-id",
    "messages": [
      { "role": "user", "content": "Hello, introduce yourself" }
    ],
    "stream": true
  }'

Replace model-id with an actual model ID from Models, and replace $API_KEY with your API key.

Next Steps