> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Completion

Send a prompt to the model and get the model's response.

**Note**: This is a legacy action and its only available with older models. It is highly recommended to use **Create Chat Completion** action instead.

<Note>
  External Documentation

  To learn more, visit the [OpenAI documentation](https://platform.openai.com/docs/api-reference/completions/create).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter | Description                                                                                                                                                                                       |
  | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Model     | The model to use. You can use the `List models` action to get all of your available models, or visit [OpenAI's Model Overview](https://platform.openai.com/docs/models) for descriptions of them. |
  | Prompt    | The prompt to generate a completion for.                                                                                                                                                          |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Stop        | Sequences of text that will instruct the model to stop generating further tokens once any of these sequences are encountered.<br /><br />The response will not include the stop sequence(s) themselves.<br /><br />Valid values are:<br />\* String: A single stop sequence (e.g., "END").<br />\* List: A comma separated list of up to 4 stop sequences (e.g., "END,STOP").<br /><br />**Note**: The quotes are used only for the example. Avoid using quotes in the `stop` parameter. |
  | Temperature | What sampling temperature to use, between `0.0` and `2.0`.<br /><br />Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.                                                                                                                                                                                                                                                                              |
  | Token Limit | The maximum number of [tokens](https://platform.openai.com/tokenizer) to generate in the completion. A higher token limit will result in a longer response.                                                                                                                                                                                                                                                                                                                              |
  | User        | A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).                                                                                                                                                                                                                                                                                                                        |
</div>

## Example Output

```json theme={"dark"}
{
	"id": "<string>",
	"object": "<string>",
	"created": 1836977401,
	"model": "<string>",
	"choices": [
		{
			"text": "<string>",
			"index": 1,
			"logprobs": null,
			"finish_reason": "<string>"
		}
	],
	"usage": {
		"prompt_tokens": 13,
		"completion_tokens": 9,
		"total_tokens": 11
	}
}
```

## Workflow Library Example

[Create Completion with Openai and Send Results Via Email](https://library.blinkops.com/workflows/create-completion-with-openai-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/create-completion-with-openai-and-send-results-via-email/canvas" />
</div>
