Endpoint#

Endpoint
POST https://xpluse.plus/v1/chat/completions

Create chat completion responses with support for text generation, multimodal input, function calling, and streaming responses.

Request parameters#

ParameterTypeRequiredDescription
ModelsstringModel identifier, such as openai/gpt-5.4-mini
messagesarrayMessage array
temperaturenumberSampling temperature from 0 to 2; default is 1
max_tokensnumberMaximum generated token count
streambooleanWhether to enable streaming responses
top_pnumberNucleus sampling parameter
frequency_penaltynumberFrequency penalty from -2 to 2
presence_penaltynumberPresence penalty from -2 to 2
toolsarrayAvailable tool definitions (Function Calling)
tool_choicestring/objectTool selection strategy
response_formatobjectResponseFormat(JSON Mode)
providerobjectDataMind AI extension: routing and fallback configuration

Request example#

cURL
curl https://xpluse.plus/v1/chat/completions \
  -H "Authorization: Bearer $DATAMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.4-mini",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Explain what an API Gateway is"}
    ],
    "temperature": 0.7
  }' 
Python
from openai import OpenAI

client = OpenAI(base_url="https://xpluse.plus/v1", api_key="<your DATAMIND_API_KEY>")

response = client.chat.completions.create(
    model="openai/gpt-5.4-mini",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain what an API Gateway is"}
    ],
    temperature=0.7
)

print(response.choices[0].message.content)
TypeScript
const response = await client.chat.completions.create({
  model: 'openai/gpt-5.4-mini',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Explain what an API Gateway is' }
  ],
  temperature: 0.7
})

console.log(response.choices[0].message.content)

Response example#

JSON
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1703123456,
  "model": "openai/gpt-5.4-mini",
  "choices": [
    {
      "index": 0,
      "message": {"role": "assistant", "content": "An API Gateway is a..."},
      "finish_reason": "stop"
    }
  ],
  "usage": {"prompt_tokens": 25, "completion_tokens": 150, "total_tokens": 175}
}

Streaming response#

Set stream: true to enable SSE streaming.

SSE chunk
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hel"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"lo"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]

For new projects, we recommend the Responses API:instructions and input are separated, and system instructions automatically benefit from Prompt Caching. Chat Completions remains fully supported, so migration is not required.

Last updated on June 22, 2026