Chat Completions
Send text using messages and read the model response.
On this page
Send a message
Set ETAGE_API_KEY securely in your environment. POST https://api.etage.one/v1/chat/completions accepts model and messages. Below is one text request to deepseek-v4.1-flash; running the example uses credits. Python uses its standard library, and TypeScript uses fetch in Node.js. Check format compatibility before choosing another model.
curl --fail-with-body -sS https://api.etage.one/v1/chat/completions \
-H "Authorization: Bearer $ETAGE_API_KEY" \
-H "Content-Type: application/json" \
--data '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}'Response and conversation history
For a non-streaming text response, read choices[0].message.content. To continue a conversation, include the required history in messages: user messages and received assistant messages, followed by a new user message. Do not assume the previous call created a stored session. History increases input; keep it within the model context and avoid unnecessary private data.