{"openapi":"3.1.0","info":{"title":"SocialCutter API","description":"API para procesar y redimensionar imágenes para redes sociales","version":"1.0.0"},"paths":{"/api/v1/images/process":{"post":{"tags":["process"],"summary":"Process Image","description":"Process image to social media formats. Stores output in GridFS.","operationId":"process_image_api_v1_images_process_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/images/upload":{"post":{"tags":["process"],"summary":"Upload And Process","description":"Upload base64 image and process to social formats.","operationId":"upload_and_process_api_v1_images_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/images/upload/file":{"post":{"tags":["process"],"summary":"Upload File And Process","description":"Upload image file (multipart) and process to social formats.","operationId":"upload_file_and_process_api_v1_images_upload_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_and_process_api_v1_images_upload_file_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/images/batch":{"post":{"tags":["process"],"summary":"Batch Process","description":"Process batch of images.","operationId":"batch_process_api_v1_images_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchImageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/images/{image_id}":{"get":{"tags":["process"],"summary":"Get Image Status","description":"Get image processing details.","operationId":"get_image_status_api_v1_images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platforms":{"get":{"tags":["process"],"summary":"List Platforms","description":"List supported platforms.","operationId":"list_platforms_api_v1_platforms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/formats":{"get":{"tags":["process"],"summary":"List Formats","description":"List supported output formats.","operationId":"list_formats_api_v1_formats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/fit-modes":{"get":{"tags":["process"],"summary":"List Fit Modes","description":"List supported fit modes.","operationId":"list_fit_modes_api_v1_fit_modes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Health check with MongoDB status.","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth","auth"],"summary":"Get Me","description":"Get current user info from Clerk session.","operationId":"get_me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/sync":{"post":{"tags":["auth","auth"],"summary":"Sync User","description":"Sync Clerk user data.","operationId":"sync_user_api_v1_auth_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/apikeys":{"get":{"tags":["apikeys"],"summary":"List Keys","description":"List all active API keys for the current user.","operationId":"list_keys_api_v1_apikeys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["apikeys"],"summary":"Create Key","description":"Create a new API key.","operationId":"create_key_api_v1_apikeys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/apikeys/{key_id}":{"delete":{"tags":["apikeys"],"summary":"Revoke Key","description":"Revoke an API key.","operationId":"revoke_key_api_v1_apikeys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/credits":{"get":{"tags":["credits"],"summary":"Get Credits","description":"Get current user's daily credits summary.","operationId":"get_credits_api_v1_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/history":{"get":{"tags":["history"],"summary":"Get History","description":"Get processing history for the current user.","operationId":"get_history_api_v1_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/storage/{file_id}":{"get":{"tags":["storage"],"summary":"Serve Storage","description":"Serve a file stored in GridFS by its ID.","operationId":"serve_storage_api_v1_storage__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["root"],"summary":"Read Root","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{path}":{"get":{"tags":["root"],"summary":"Serve Frontend","operationId":"serve_frontend__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BatchImageRequest":{"properties":{"images":{"items":{"$ref":"#/components/schemas/ProcessRequest"},"type":"array","title":"Images"}},"type":"object","required":["images"],"title":"BatchImageRequest","description":"Batch image processing request."},"Body_upload_file_and_process_api_v1_images_upload_file_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"destinations":{"type":"string","title":"Destinations"},"options":{"type":"string","title":"Options","default":"{}"}},"type":"object","required":["file","destinations"],"title":"Body_upload_file_and_process_api_v1_images_upload_file_post"},"CreateKeyRequest":{"properties":{"name":{"type":"string","title":"Name","default":"Default"}},"type":"object","title":"CreateKeyRequest"},"CreateKeyResponse":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"message":{"type":"string","title":"Message"}},"type":"object","required":["key","name","message"],"title":"CreateKeyResponse"},"Destination":{"properties":{"platform":{"type":"string","title":"Platform","description":"Social platform: instagram, facebook, twitter, linkedin, youtube, tiktok"},"format":{"type":"string","title":"Format","description":"Format type: post, story, cover, etc."},"fit_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fit Mode","description":"Fit mode: cover, contain, fill, stretch","default":"cover"}},"type":"object","required":["platform","format"],"title":"Destination","description":"Destination platform and format."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageOutput":{"properties":{"platform":{"type":"string","title":"Platform"},"format":{"type":"string","title":"Format"},"url":{"type":"string","title":"Url"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["platform","format","url","width","height","size_bytes"],"title":"ImageOutput","description":"Processed image output."},"ImageSource":{"properties":{"type":{"type":"string","enum":["url","base64"],"title":"Type","description":"Source type: url or base64"},"value":{"type":"string","title":"Value","description":"URL or base64 encoded image data"}},"type":"object","required":["type","value"],"title":"ImageSource","description":"Image source with type and value."},"ProcessMetadata":{"properties":{"processing_time_ms":{"type":"integer","title":"Processing Time Ms"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["processing_time_ms","created_at"],"title":"ProcessMetadata","description":"Processing metadata."},"ProcessOptions":{"properties":{"quality":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Quality","description":"Output quality 1-100","default":85},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Output format: png, jpg, webp","default":"webp"},"background_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Color","description":"Background color for contain mode","default":"#000000"}},"type":"object","title":"ProcessOptions","description":"Processing options."},"ProcessRequest":{"properties":{"source":{"$ref":"#/components/schemas/ImageSource"},"destinations":{"items":{"$ref":"#/components/schemas/Destination"},"type":"array","title":"Destinations"},"options":{"anyOf":[{"$ref":"#/components/schemas/ProcessOptions"},{"type":"null"}],"default":{"quality":85,"format":"webp","background_color":"#000000"}}},"type":"object","required":["source","destinations"],"title":"ProcessRequest","description":"Process image request."},"ProcessResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"outputs":{"items":{"$ref":"#/components/schemas/ImageOutput"},"type":"array","title":"Outputs"},"metadata":{"$ref":"#/components/schemas/ProcessMetadata"}},"type":"object","required":["id","status","outputs","metadata"],"title":"ProcessResponse","description":"Process image response."},"UploadRequest":{"properties":{"image":{"type":"string","title":"Image","description":"Base64 encoded image data"},"destinations":{"items":{"$ref":"#/components/schemas/Destination"},"type":"array","title":"Destinations"},"options":{"anyOf":[{"$ref":"#/components/schemas/ProcessOptions"},{"type":"null"}],"default":{"quality":85,"format":"webp","background_color":"#000000"}}},"type":"object","required":["image","destinations"],"title":"UploadRequest","description":"Upload base64 image request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}