Proxy endpoint for OpenAI Chat Completions API
curl --location 'https://api.altrum.ai/v1/openai/chat/completions' --header 'Authorization: Bearer OPENAI_API_KEY' --header 'Project-Api-Key: ALTRUMAI_PROJECT_API_KEY' --header 'Content-Type: application/json' --data '{ "model":"gpt-4o", "messages": [ {"role":"assistant", "content":"You are a helpful assistant"}, {"role":"user", "content":"Hello!"} ], "stream":false }'
{ "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "Hello! How can I help you today?", "function_call": "null", "role": "assistant", "tool_calls": "null" } } ], "created": 1727783366, "id": "chatcmpl-ADVfa3yTDasv2SmnBe5DbR2di1Mp2", "model": "gpt-3.5-turbo-0125", "object": "chat.completion", "system_fingerprint": "null", "usage": { "completion_tokens": 9, "prompt_tokens": 19, "total_tokens": 28 } }
Note: Only Chat Completion LLMs are compatible with this proxy.
OpenAI API key in format 'Bearer sk-...'
Schema for OpenAI API requests.
Successful Response
Schema for LLM model responses.