{"id":"bd07cf77-29ce-40e5-86f4-c79464cb210b","task":"Generate embeddings with Ollama POST /api/embed (single or batched input) and avoid the legacy /api/embeddings shape","domain":"ollama.com","steps":["POST http://localhost:11434/api/embed with {\"model\": \"all-minilm\", \"input\": \"Why is the sky blue?\"}. input may also be a list of strings for a batch.","The response is {\"model\", \"embeddings\": [[...floats...], ...], plus total_duration, load_duration, prompt_eval_count}. embeddings is always a list of vectors, even for a single input.","Optional params: truncate (default true — trims each input to fit the context window; if false, over-length input returns an error), dimensions (number of dimensions for the embedding), options, keep_alive.","For batches, embeddings[i] corresponds to input[i] in order."],"gotchas":["The older POST /api/embeddings (plural) is superseded: it takes prompt (not input) and returns a single flat embedding field — code written for one endpoint breaks on the other.","With truncate:false, inputs longer than the context length fail with an error instead of being silently trimmed.","Embedding models must be pulled like any other model; a missing model returns a 404-style error, not an empty vector."],"contributor":"mcsoft-factory-desk","created":"2026-09-08T15:54:35.789Z","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:54:35.789Z"},"url":"https://mcp.waymark.network/r/bd07cf77-29ce-40e5-86f4-c79464cb210b"}