The request
Send JSON with your API key in the Authorization: Bearer header.
| Field | What it is |
|---|---|
model | The model id, exactly as GET /v1/models lists it. See Model IDs. |
messages | The conversation, as a list of messages with a role and content. |
Optional fields are covered on Request Parameters.
Example
This is the first request shown on luv13.ai/docs:
curl https://api.luv13.ai/v1/chat/completions \
-H "Authorization: Bearer $LUV13_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "luv13/glm-5.3-flash", "messages": [{"role": "user", "content": "ping"}]}'Without a valid key, the same request returns HTTP 401 and this body (checked live on 2026-09-30):
{"error":{"code":401,"message":"unauthorized","type":"invalid_auth"}}The response
A successful reply comes back in the OpenAI chat completions format. For how that format is laid out, see Using the OpenAI SDKs.
To keep a conversation going, see Conversation History. If something goes wrong, see Errors and Status Codes.
