非流式生成请求(No Streaming)
POST
http://localhost:11434/api/generate
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:11434/api/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "string",
"prompt": "string",
"stream": true
}'
响应示例响应示例
{
"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": 5043500667,
"load_duration": 5025959,
"prompt_eval_count": 26,
"prompt_eval_duration": 325953000,
"eval_count": 290,
"eval_duration": 4709213000
}
请求参数
Body 参数application/json
返回响应
修改于 2025-03-26 09:52:14