Skip to main content

Base URL

All API requests are made to:
https://api.modelstack.cc

OpenAI-Compatible Format

ModelStack follows the OpenAI API format, so you can use any existing OpenAI SDK or HTTP client. Just change the base URL and API key.

Available Endpoints

MethodEndpointDescription
POST/v1/chat/completionsCreate a chat completion
GET/v1/modelsList available models

Authentication

All requests require an API key passed via the Authorization header:
Authorization: Bearer your_api_key
API keys are created and managed from your dashboard.

Request Format

All requests use JSON. Set the Content-Type header:
Content-Type: application/json

Response Format

Responses follow the OpenAI response format:
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1699000000,
  "model": "claude-sonnet-4-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 15,
    "total_tokens": 25
  }
}

Streaming

ModelStack supports Server-Sent Events (SSE) streaming. Set "stream": true in your request body to receive incremental responses.

Rate Limits

Rate limits depend on your subscription plan:
PlanRate Limit
Starter15 RPM
Pro40 RPM
Max60 RPM
When you exceed your rate limit, requests return a 429 Too Many Requests error.