openapi: 3.2.0 info: title: GPT Backend Content Editing API version: 0.1.0 servers: - url: https://api.usepomo.ai description: Base URL declared by the provider in apis.yml (roadmap#122). tags: - name: content-editing paths: /api/content-editing/edit-image: post: tags: - content-editing summary: Edit Image description: 'Process an image using AI to edit based on the prompt - Takes an uploaded image - Takes a text prompt describing the desired edits - Optional flag to use company style - Optional product image to insert into the scene - Optional logo image to incorporate naturally - Returns original image URL and list of edited image URLs' operationId: edit_image_api_content_editing_edit_image_post requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_edit_image_api_content_editing_edit_image_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ContentEditResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/content-editing/generate-image: post: tags: - content-editing summary: Generate Image description: 'Generate images based on a text prompt - Takes a text prompt describing the desired image - Optional size parameter in format "widthxheight" - Optional aspect_ratio parameter ("1:1", "3:4", "4:3", "9:16", "16:9") - Optional number of images to generate - Optional reference images to guide the generation - Optional use_company_style flag to incorporate company branding - Returns URLs to the generated images' operationId: generate_image_api_content_editing_generate_image_post requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_generate_image_api_content_editing_generate_image_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ImageGenerationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/content-editing/generate-ideas: get: tags: - content-editing summary: Generate Ideas description: 'Generate creative ideas for image editing based on company profile - Takes optional number of ideas to generate (default: 4) - Optional edit_image flag to determine whether to generate ideas for editing existing images or creating new ones - Uses company profile information if available - Returns a list of creative idea prompts' operationId: generate_ideas_api_content_editing_generate_ideas_get security: - HTTPBearer: [] parameters: - name: num_ideas in: query required: false schema: type: integer default: 4 title: Num Ideas - name: edit_image in: query required: false schema: type: boolean default: false title: Edit Image responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CreativeIdeasResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError ImageGenerationResponse: properties: image_urls: items: type: string type: array title: Image Urls prompt: type: string title: Prompt enhanced_prompt: anyOf: - type: string - type: 'null' title: Enhanced Prompt ai_policy_eval: anyOf: - additionalProperties: true type: object - type: 'null' title: Ai Policy Eval created_at: anyOf: - type: string - type: 'null' title: Created At type: object required: - image_urls - prompt - created_at title: ImageGenerationResponse description: Response model for generated images Body_edit_image_api_content_editing_edit_image_post: properties: image: type: string format: binary title: Image prompt: type: string title: Prompt use_company_style: type: boolean title: Use Company Style default: false product_image: anyOf: - type: string format: binary - type: 'null' title: Product Image logo_image: anyOf: - type: string format: binary - type: 'null' title: Logo Image num_variations: type: integer title: Num Variations default: 3 type: object required: - image - prompt title: Body_edit_image_api_content_editing_edit_image_post CreativeIdeasResponse: properties: creative_ideas: items: type: string type: array title: Creative Ideas type: object required: - creative_ideas title: CreativeIdeasResponse description: Response model for the generate-ideas endpoint ImageVariation: properties: url: type: string title: Url index: type: integer title: Index metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata type: object required: - url - index title: ImageVariation description: Information about an image variation Body_generate_image_api_content_editing_generate_image_post: properties: prompt: type: string title: Prompt size: type: string title: Size default: 1024x1024 aspect_ratio: anyOf: - type: string - type: 'null' title: Aspect Ratio num_images: type: integer title: Num Images default: 1 reference_images: items: type: string format: binary type: array title: Reference Images use_company_style: type: boolean title: Use Company Style default: false type: object required: - prompt title: Body_generate_image_api_content_editing_generate_image_post ContentEditResponse: properties: edited_image_urls: items: type: string type: array title: Edited Image Urls default: [] original_image_url: type: string title: Original Image Url variations: anyOf: - items: $ref: '#/components/schemas/ImageVariation' type: array - type: 'null' title: Variations type: object required: - original_image_url title: ContentEditResponse description: Response model for edited image content securitySchemes: HTTPBearer: type: http scheme: bearer