Generate request (With options)
POST
http://localhost:11434/api/generate
options
parameter. This example sets every available option, but you can set any of them individually and omit the ones you do not want to override.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:11434/api/generate' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
{
"model": "llama3.2",
"created_at": "2023-08-04T19:22:45.499127Z",
"response": "The sky is blue because it is the color of the sky.",
"done": true,
"context": [
1,
2,
3
],
"total_duration": 4935886791,
"load_duration": 534986708,
"prompt_eval_count": 26,
"prompt_eval_duration": 107345000,
"eval_count": 237,
"eval_duration": 4289432000
}
Request
Body Params application/json
Responses
Modified at 2025-03-27 10:06:41