ModelSheep

Docs

Chat completions

POSThttps://api.modelsheep.com/chat/completions
POSThttps://api.modelsheep.com/v1/chat/completions

Creates a model response for a list of chat messages. The endpoint is compatible with the OpenAI chat completions endpoint, so the official SDKs call it without changes.

Both paths are served and return the same response. The OpenAI SDKs append /v1 on their own.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.modelsheep.com",
    api_key=API_KEY_MODELSHEEP,
)

response = client.chat.completions.create(
    model="Qwen/Qwen3.5-35B-A3B-FP8",
    messages=[
        {
            "role": "user",
            "content": "Why do sheep count people?"
        }
    ],
    max_tokens=200,
)

print(response.choices[0].message.content)

Request Body

arrayrequired
The conversation so far, oldest first.
modelstringrequired
A public model name, as listed on /models.
max_tokensinteger
The maximum number of tokens in the response.
temperaturenumber
Sampling temperature. Higher values give more varied output. Defaults to the model default.
top_pnumber
Nucleus sampling, an alternative to temperature.
stopstring or array
One or more strings that end the response.
array
Functions the model may call. The response then carries tool_calls instead of content.
object
The shape the response must take.

Response

idstring
The id of this completion.
objectstring
The type of object returned.
createdinteger
The creation time in unix seconds.
modelstring
The model that produced the response.
array
The generated responses, one entry unless more were requested.
object
The token counts the call is priced on.

Response Example

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1789832000,
  "model": "Qwen/Qwen3.5-35B-A3B-FP8",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Counting is a rhythm without a destination."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 41,
    "total_tokens": 55
  }
}