--- title: 'POST /chat/completions' description: 'Create a chat completion' --- # POST /chat/completions Create a chat completion | Detail | Value | |---|---| | Operation ID | `ai.createChatCompletion` | | Method | `POST` | | Path | `/chat/completions` | | Connector | [OpenAI](./) | ## Parameters _No parameters._ ## Request Body | Field | Type | |---|---| | `model` | string | | `messages` | array | | `temperature` | number | ## Using this endpoint in a workflow 1. Add an **API Call** node to your workflow. 2. Pick your OpenAI connection from the Connection dropdown. 3. In the Operation dropdown, select `ai.createChatCompletion`. 4. Fill in the parameter fields that appear. Use `{{...}}` to reference upstream values. **Required fields are marked — fill them or the call will fail at runtime.** ## What it returns The `API Call` node writes the response to the workflow context: ``` { status: 200, success: true, data: { ...response body from the API... }, latencyMs: 142 } ``` Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream OpenAI API reference.