POST
/
v1
/
azure
/
{endpoint}
/
openai
/
deployments
/
{deployment_id}
/
chat
/
completions
curl --location 'https://api.altrum.ai/v1/azure/{ENDPOINT}/openai/deployments/{DEPLOYMENT_ID}/chat/completions?api-version=2024-10-21' --header 'Authorization: Bearer AZURE_OPENAI_API_KEY' --header 'Project-Api-Key: ALTRUMAI_PROJECT_API_KEY' --header 'Content-Type: application/json' --data '{
    "model":"gpt-4o-mini",
    "messages": [
        {"role":"assistant", "content":"You are a helpful assistant"},
        {"role":"user", "content":"Hello!"}
    ],
    "stream":false
}'
{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "The United Kingdom (UK) is a country located off the northwestern coast of mainland Europe. It is made up of four constituent countries: England, Scotland, Wales, and Northern Ireland. The capital city is London, which is not only the largest city in the UK but also a major global financial and cultural center.**History**: The UK has a rich history that includes the Roman occupation, the formation of the monarchy, the spread of the British Empire, and significant events like the Industrial Revolution and both World Wars.\n\n2. **Culture**: The UK is renowned for its contributions to literature, music, and the arts. Famous writers such as William Shakespeare, Jane Austen, and Charles Dickens hail from the UK, while it has produced iconic musical acts like The Beatles and The Rolling Stones.",
        "role": "assistant"
      }
    }
  ],
  "created": 1731996835,
  "id": "chatcmpl-AVBmlqDqjlUbqwnW6j7V8FKP36Vbw",
  "model": "gpt-4o-mini",
  "object": "chat.completion",
  "system_fingerprint": "fp_04751d0b65",
  "usage": {
    "completion_tokens": 401,
    "prompt_tokens": 22,
    "total_tokens": 423
  }
}

Note: Only Chat Completion LLMs are compatible with this proxy.

Authorizations

Project-Api-Key
string
header
required

Headers

authorization
string
required

Azure OpenAI API key in format 'Bearer {key}'

Path Parameters

endpoint
string
required

The Azure OpenAI endpoint name

deployment_id
string
required

The deployment ID of the model

Query Parameters

api-version
string
required

Azure OpenAI API version

Body

application/json

Schema for Azure OpenAI API requests.

Response

200
application/json

Successful Response

Schema for LLM model responses.