### Send a Chat Completion Request Source: https://lemondata.cc This example shows how to send a chat completion request to the API, specifying the model and user message. Ensure you have the correct model name and message content. ```json { "model": "gpt-5.5", "messages": [ { "role": "user", "content": "Summarize this release note" } ] } ``` -------------------------------- ### Chat Completions Source: https://lemondata.cc This endpoint allows you to interact with various chat models through an OpenAI-compatible interface. You can specify the model, messages, and other parameters to get AI-generated responses. ```APIDOC ## POST /v1/chat/completions ### Description This endpoint allows you to interact with various chat models through an OpenAI-compatible interface. You can specify the model, messages, and other parameters to get AI-generated responses. ### Method POST ### Endpoint /v1/chat/completions ### Request Body - **model** (string) - Required - The ID of the model to use for this request. - **messages** (array) - Required - A list of messages comprising the conversation so far. - **role** (string) - Required - The role of the author of a message (e.g., 'user' or 'assistant'). - **content** (string) - Required - The content of the message. ### Request Example ```json { "model": "gpt-5.5", "messages": [ { "role": "user", "content": "Summarize this release note" } ] } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the response. - **object** (string) - The type of object returned, usually 'chat.completion'. - **created** (integer) - Unix timestamp of when the response was created. - **model** (string) - The model used for the response. - **choices** (array) - A list of choices for the completion. - **index** (integer) - The index of the choice. - **message** (object) - The message content. - **role** (string) - The role of the author of the message. - **content** (string) - The content of the message. - **finish_reason** (string) - The reason the model stopped generating tokens. - **usage** (object) - Usage statistics for the request. - **prompt_tokens** (integer) - Number of tokens in the prompt. - **completion_tokens** (integer) - Number of tokens in the completion. - **total_tokens** (integer) - Total number of tokens used. #### Response Example ```json { "id": "chatcmpl-12345", "object": "chat.completion", "created": 1677652288, "model": "gpt-5.5", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The release adds faster model routing, clearer fallback errors, and public pricing for the newest GPT, Claude, Gemini, image, and video families. Existing OpenA" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 10, "completion_tokens": 20, "total_tokens": 30 } } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.