{"openapi":"3.0.1","info":{"title":"Winnow Customer AI API","description":"OpenAI-compatible chat, completion, embedding, and model-discovery endpoints for customer SDK generation.","version":"v1"},"servers":[{"url":"https://schemadriven.ai/winnow"}],"paths":{"/v1/models":{"get":{"tags":["ActorRegistry"],"responses":{"200":{"description":"Success"}}}},"/v1/models/{modelId}":{"get":{"tags":["ActorRegistry"],"parameters":[{"name":"modelId","in":"path","required":true,"style":"simple","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/api/invoices/scan":{"post":{"tags":["Invoices"],"parameters":[{"name":"wait","in":"query","style":"form","schema":{"type":"boolean","default":true}},{"name":"waitSeconds","in":"query","style":"form","schema":{"type":"integer","format":"int32","default":300}},{"name":"checks","in":"query","style":"form","schema":{"type":"integer","format":"int32","default":3}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"images":{"type":"array","items":{"type":"string","format":"binary"}},"image":{"type":"string","format":"binary"},"notes":{"type":"string"}}},"encoding":{"images":{"style":"form"},"image":{"style":"form"},"notes":{"style":"form"}}}}},"responses":{"200":{"description":"Success"}}}},"/api/invoices/{id}":{"get":{"tags":["Invoices"],"parameters":[{"name":"id","in":"path","required":true,"style":"simple","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/api/invoices/{id}/document":{"get":{"tags":["Invoices"],"parameters":[{"name":"id","in":"path","required":true,"style":"simple","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/api/invoices":{"get":{"tags":["Invoices"],"parameters":[{"name":"take","in":"query","style":"form","schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"Success"}}}},"/api/menus/scan":{"post":{"tags":["Menus"],"parameters":[{"name":"wait","in":"query","style":"form","schema":{"type":"boolean","default":true}},{"name":"waitSeconds","in":"query","style":"form","schema":{"type":"integer","format":"int32","default":300}},{"name":"checks","in":"query","style":"form","schema":{"type":"integer","format":"int32","default":3}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"images":{"type":"array","items":{"type":"string","format":"binary"}},"image":{"type":"string","format":"binary"},"notes":{"type":"string"}}},"encoding":{"images":{"style":"form"},"image":{"style":"form"},"notes":{"style":"form"}}}}},"responses":{"200":{"description":"Success"}}}},"/api/menus/{id}":{"get":{"tags":["Menus"],"parameters":[{"name":"id","in":"path","required":true,"style":"simple","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/api/menus/{id}/document":{"get":{"tags":["Menus"],"parameters":[{"name":"id","in":"path","required":true,"style":"simple","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/api/menus":{"get":{"tags":["Menus"],"parameters":[{"name":"take","in":"query","style":"form","schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"Success"}}}},"/api/ocr/extract":{"post":{"tags":["Ocr"],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"images":{"type":"array","items":{"type":"string","format":"binary"}},"image":{"type":"string","format":"binary"},"kind":{"type":"string","default":"recipe"},"notes":{"type":"string"}}},"encoding":{"images":{"style":"form"},"image":{"style":"form"},"kind":{"style":"form"},"notes":{"style":"form"}}}}},"responses":{"200":{"description":"Success"}}}},"/v1/chat/completions":{"post":{"tags":["OpenAILike"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionsRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionsRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ChatCompletionsRequest"}}}},"responses":{"200":{"description":"Success"}}}},"/v1/completions":{"post":{"tags":["OpenAILike"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextCompletionsRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/TextCompletionsRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/TextCompletionsRequest"}}}},"responses":{"200":{"description":"Success"}}}},"/v1/embeddings":{"post":{"tags":["OpenAILike"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/EmbeddingsRequest"}}}},"responses":{"200":{"description":"Success"}}}},"/api/receipts/scan":{"post":{"tags":["Receipts"],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"images":{"type":"array","items":{"type":"string","format":"binary"}},"image":{"type":"string","format":"binary"},"notes":{"type":"string"}}},"encoding":{"images":{"style":"form"},"image":{"style":"form"},"notes":{"style":"form"}}}}},"responses":{"200":{"description":"Success"}}}},"/api/receipts/{id}":{"get":{"tags":["Receipts"],"parameters":[{"name":"id","in":"path","required":true,"style":"simple","schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/api/receipts/interpret":{"post":{"tags":["Receipts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Receipts.InterpretLineRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Receipts.InterpretLineRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Receipts.InterpretLineRequest"}}}},"responses":{"200":{"description":"Success"}}}},"/api/receipts":{"get":{"tags":["Receipts"],"parameters":[{"name":"take","in":"query","style":"form","schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"Success"}}}},"/api/recipe-expert/status":{"get":{"tags":["RecipeExpert"],"responses":{"200":{"description":"Success"}}}},"/api/recipe-expert/questions":{"post":{"tags":["RecipeExpert"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.RecipeQuestionApiRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.RecipeQuestionApiRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.RecipeQuestionApiRequest"}}}},"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.RecipeAnswer"}},"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.RecipeAnswer"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.RecipeAnswer"}}}}}}},"/api/recipe-expert/ingredients/map":{"post":{"tags":["RecipeExpert"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasMapApiRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasMapApiRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasMapApiRequest"}}}},"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.IngredientMappingResult"}},"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.IngredientMappingResult"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.IngredientMappingResult"}}}}}}},"/api/recipe-expert/ingredients/aliases/map":{"post":{"tags":["RecipeExpert"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasBatchMapApiRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasBatchMapApiRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasBatchMapApiRequest"}}}},"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasBatchMapResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasBatchMapResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.IngredientAliasBatchMapResponse"}}}}}}},"/api/recipe-expert/uom/convert":{"post":{"tags":["RecipeExpert"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.UomConversionApiRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.UomConversionApiRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Winnow.API.Controllers.UomConversionApiRequest"}}}},"responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.UomConversionResult"}},"application/json":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.UomConversionResult"}},"text/json":{"schema":{"$ref":"#/components/schemas/Winnow.Domain.Messages.UomConversionResult"}}}}}}}},"components":{"schemas":{"ChatCompletionsRequest":{"type":"object","properties":{"model":{"type":"string","nullable":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Winnow.Messages.ChatMessage"},"nullable":true},"stream":{"type":"boolean"},"max_tokens":{"type":"integer","format":"int32","nullable":true},"conversationId":{"type":"string","format":"uuid"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ToolDefinition"},"nullable":true},"tool_choice":{"nullable":true}},"additionalProperties":false},"EmbeddingsRequest":{"type":"object","properties":{"model":{"type":"string","nullable":true},"input":{"type":"string","nullable":true}},"additionalProperties":false},"TextCompletionsRequest":{"type":"object","properties":{"model":{"type":"string","nullable":true},"prompt":{"type":"string","nullable":true},"max_tokens":{"type":"integer","format":"int32"},"temperature":{"type":"number","format":"float"}},"additionalProperties":false},"ToolDefinition":{"type":"object","properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"input_schema":{"nullable":true}},"additionalProperties":false},"Winnow.API.Controllers.IngredientAliasBatchMapApiRequest":{"type":"object","properties":{"aliases":{"type":"array","items":{"type":"string"},"nullable":true},"correlationId":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.API.Controllers.IngredientAliasBatchMapResponse":{"type":"object","properties":{"correlationId":{"type":"string","nullable":true},"results":{"type":"array","items":{"$ref":"#/components/schemas/Winnow.Domain.Messages.IngredientMappingResult"},"nullable":true}},"additionalProperties":false},"Winnow.API.Controllers.IngredientAliasMapApiRequest":{"type":"object","properties":{"ingredient":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.API.Controllers.RecipeQuestionApiRequest":{"type":"object","properties":{"question":{"type":"string","nullable":true},"context":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.API.Controllers.UomConversionApiRequest":{"type":"object","properties":{"ingredient":{"type":"string","nullable":true},"fromAmount":{"type":"string","nullable":true},"fromUnit":{"type":"string","nullable":true},"toUnit":{"type":"string","nullable":true},"correlationId":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.API.Receipts.InterpretLineRequest":{"type":"object","properties":{"line":{"$ref":"#/components/schemas/Winnow.API.Receipts.ReceiptLine"},"vendor":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.API.Receipts.ReceiptLine":{"type":"object","properties":{"description":{"type":"string","nullable":true},"itemCode":{"type":"string","nullable":true},"quantity":{"type":"number","format":"double","nullable":true},"unit":{"type":"string","nullable":true},"weightLb":{"type":"number","format":"double","nullable":true},"unitPrice":{"type":"number","format":"double","nullable":true},"lineTotal":{"type":"number","format":"double","nullable":true},"isWeighed":{"type":"boolean"},"lineType":{"type":"string","nullable":true},"discountPercent":{"type":"number","format":"double","nullable":true}},"additionalProperties":false},"Winnow.Domain.Messages.IngredientMappingResult":{"type":"object","properties":{"original":{"type":"string","nullable":true},"canonicalName":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"standardUnit":{"type":"string","nullable":true},"parsedQuantity":{"type":"number","format":"double","nullable":true},"parsedUnit":{"type":"string","nullable":true},"evidence":{"type":"string","nullable":true},"confidence":{"type":"number","format":"float"},"latencyMs":{"type":"integer","format":"int32"},"correlationId":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.Domain.Messages.RecipeAnswer":{"type":"object","properties":{"answer":{"type":"string","nullable":true},"confidence":{"type":"number","format":"float"},"latencyMs":{"type":"integer","format":"int32"},"correlationId":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.Domain.Messages.UomConversionResult":{"type":"object","properties":{"ingredient":{"type":"string","nullable":true},"convertedAmount":{"type":"number","format":"double"},"unit":{"type":"string","nullable":true},"confidence":{"type":"number","format":"float"},"latencyMs":{"type":"integer","format":"int32"},"correlationId":{"type":"string","nullable":true}},"additionalProperties":false},"Winnow.Messages.ChatMessage":{"type":"object","properties":{"role":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"reasoning":{"type":"string","nullable":true},"images":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false}},"securitySchemes":{"Bearer":{"type":"http","description":"Use `Bearer <customer-api-key>`.","scheme":"bearer","bearerFormat":"API key"}}},"security":[{"Bearer":[]}]}