POST
/
{provider}
/
chat
/
completions
curl --request POST \
  --url https://api.openmind.org/api/core/{provider}/chat/completions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "system",
      "content": "<string>"
    }
  ]
}'
{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "logprobs": null,
      "message": {
        "annotations": [],
        "content": "Hello! How can I assist you today?",
        "refusal": null,
        "role": "assistant"
      }
    }
  ],
  "created": 1742147458,
  "id": "chatcmpl",
  "model": "gpt-4o-2024-08-06",
  "object": "chat.completion",
  "service_tier": "default",
  "system_fingerprint": "fingerprint",
  "usage": {
    "completion_tokens": 10,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 0,
      "rejected_prediction_tokens": 0
    },
    "prompt_tokens": 8,
    "prompt_tokens_details": {
      "audio_tokens": 0,
      "cached_tokens": 0
    },
    "total_tokens": 18
  }
}

OpenMind integrates with multiple language models (LLMs) to provide chat completions. This endpoint allows you to interact with different LLM providers to generate chat completions.

Authorizations

x-api-key
string
header
required

Path Parameters

provider
enum<string>
required

The provider of the LLM (openai, deepseek, gemini)

Available options:
openai,
deepseek,
gemini,
xai

Body

application/json

Response

200
application/json

Successful response

The response is of type object.