openapi: 3.2.0 info: title: Tandoor Ai Import API version: 0.0.0 (2.6.13) x-logo: url: /static/assets/brand_logo.svg backgroundColor: '#FFFFFF' altText: Tandoor logo href: / description: Tandoor API Docs tags: - name: Ai Import paths: /api/ai-import/: post: operationId: apiAiImportCreate description: given an image or PDF file convert its content to a structured recipe using AI and the scraping system tags: - Ai Import requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/AiImport' required: true security: - ApiKeyAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/RecipeFromSourceResponse' description: '' summary: Api ai import create x-summary-source: derived components: schemas: SourceImportDuplicate: type: object properties: id: type: integer readOnly: false name: type: string required: - name SourceImportProperty: type: object properties: property_type: $ref: '#/components/schemas/SourceImportPropertyType' property_amount: type: number format: double required: - property_amount - property_type RecipeFromSourceResponse: type: object properties: recipe: $ref: '#/components/schemas/SourceImportRecipe' recipe_id: type: integer images: type: array items: type: string default: [] error: type: boolean default: false msg: type: string default: '' maxLength: 1024 duplicates: type: array items: $ref: '#/components/schemas/SourceImportDuplicate' default: [] SourceImportPropertyType: type: object properties: id: type: integer readOnly: false name: type: string required: - name SourceImportFood: type: object properties: name: type: string required: - name SourceImportIngredient: type: object properties: amount: type: number format: double food: $ref: '#/components/schemas/SourceImportFood' unit: $ref: '#/components/schemas/SourceImportUnit' note: type: string order: type: - integer - 'null' original_text: type: string required: - amount - food - original_text - unit SourceImportKeyword: type: object properties: id: type: - integer - 'null' readOnly: false label: type: string name: type: string import_keyword: type: boolean default: true required: - label - name SourceImportRecipe: type: object properties: steps: type: array items: $ref: '#/components/schemas/SourceImportStep' internal: type: boolean default: true source_url: type: string format: uri name: type: string description: type: string servings: type: integer default: 1 servings_text: type: string default: '' working_time: type: integer default: 0 waiting_time: type: integer default: 0 image_url: type: string format: uri keywords: type: array items: $ref: '#/components/schemas/SourceImportKeyword' default: [] properties: type: array items: $ref: '#/components/schemas/SourceImportProperty' default: [] required: - name - source_url - steps SourceImportStep: type: object properties: instruction: type: string ingredients: type: array items: $ref: '#/components/schemas/SourceImportIngredient' show_ingredients_table: type: boolean default: true required: - ingredients - instruction SourceImportUnit: type: object properties: name: type: string required: - name AiImport: type: object properties: ai_provider_id: type: integer file: type: - string - 'null' format: uri text: type: - string - 'null' recipe_id: type: - string - 'null' required: - ai_provider_id - file - recipe_id - text securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization