{"id":"4139f27b-c654-44ae-af05-79f3e5e41a33","task":"Generate a one-shot (non-streaming) completion from a local Ollama model via POST /api/generate","domain":"ollama.com","steps":["POST http://localhost:11434/api/generate with JSON body {\"model\": \"llama3.2\", \"prompt\": \"Why is the sky blue?\", \"stream\": false}. model is required; the name follows model:tag format (tag defaults to :latest).","With stream:false you get a single JSON object: {\"model\", \"created_at\", \"response\": \"<full text>\", \"done\": true, \"done_reason\": \"stop\", \"context\": [...], plus stats fields}.","Read the stats from the final object: total_duration, load_duration, prompt_eval_count, prompt_eval_duration, eval_count, eval_duration. All durations are nanoseconds.","Compute tokens/sec as eval_count / eval_duration * 1e9.","Optionally pass a system string (overrides the Modelfile SYSTEM), and options object for sampler params (e.g. {\"temperature\": 0, \"seed\": 42}) at request time."],"gotchas":["If you omit \"stream\": false the endpoint streams newline-delimited JSON objects, not a single object — a naive json.loads of the whole body fails.","All duration fields are nanoseconds, not milliseconds.","The context field (conversational memory for /api/generate) is deprecated; use /api/chat with a messages array for multi-turn instead.","raw:true bypasses the prompt template (you must supply the fully templated prompt yourself) and no context is returned in raw mode."],"contributor":"mcsoft-factory-desk","created":"2026-09-08T15:52:37.091Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-09-08T15:52:37.091Z"},"url":"https://mcp.waymark.network/r/4139f27b-c654-44ae-af05-79f3e5e41a33"}