| { | |
| "info": { | |
| "name": "Colorize API", | |
| "_postman_id": "f3f5d3cc-6a2b-4d2e-9b1e-collection-colorize", | |
| "description": "Postman collection for the Colorize Image API (FastAPI). Import this file into Postman.", | |
| "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
| }, | |
| "item": [ | |
| { | |
| "name": "Authentication", | |
| "item": [ | |
| { | |
| "name": "Login (Firebase Auth - email/password)", | |
| "event": [ | |
| { | |
| "listen": "test", | |
| "script": { | |
| "type": "text/javascript", | |
| "exec": [ | |
| "try {", | |
| " const res = pm.response.json();", | |
| " if (res.idToken) pm.collectionVariables.set('id_token', res.idToken);", | |
| " if (res.refreshToken) pm.collectionVariables.set('refresh_token', res.refreshToken);", | |
| " if (res.localId) pm.collectionVariables.set('local_id', res.localId);", | |
| "} catch (e) {", | |
| " console.log('Failed to parse login response', e);", | |
| "}" | |
| ] | |
| } | |
| } | |
| ], | |
| "request": { | |
| "method": "POST", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n \"email\": \"{{email}}\",\n \"password\": \"{{password}}\",\n \"returnSecureToken\": true\n}" | |
| }, | |
| "url": { | |
| "raw": "https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key={{firebase_api_key}}", | |
| "protocol": "https", | |
| "host": [ | |
| "identitytoolkit", | |
| "googleapis", | |
| "com" | |
| ], | |
| "path": [ | |
| "v1", | |
| "accounts:signInWithPassword" | |
| ], | |
| "query": [ | |
| { | |
| "key": "key", | |
| "value": "{{firebase_api_key}}" | |
| } | |
| ] | |
| }, | |
| "description": "Obtain Firebase Auth id_token using email/password. Stores id_token in collection variable {{id_token}}." | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "Health", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "url": { | |
| "raw": "{{base_url}}/health", | |
| "host": [ | |
| "{{base_url}}" | |
| ], | |
| "path": [ | |
| "health" | |
| ] | |
| } | |
| } | |
| }, | |
| { | |
| "name": "Upload Image", | |
| "request": { | |
| "method": "POST", | |
| "header": [ | |
| { | |
| "key": "Authorization", | |
| "value": "Bearer {{id_token}}", | |
| "type": "text" | |
| }, | |
| { | |
| "key": "X-Firebase-AppCheck", | |
| "value": "{{app_check_token}}", | |
| "type": "text" | |
| } | |
| ], | |
| "body": { | |
| "mode": "formdata", | |
| "formdata": [ | |
| { | |
| "key": "file", | |
| "type": "file", | |
| "src": [] | |
| } | |
| ] | |
| }, | |
| "url": { | |
| "raw": "{{base_url}}/upload", | |
| "host": [ | |
| "{{base_url}}" | |
| ], | |
| "path": [ | |
| "upload" | |
| ] | |
| }, | |
| "description": "Choose an image file in form-data 'file'. Returns image_url and filename." | |
| } | |
| }, | |
| { | |
| "name": "Colorize Image", | |
| "request": { | |
| "method": "POST", | |
| "header": [ | |
| { | |
| "key": "Authorization", | |
| "value": "Bearer {{id_token}}", | |
| "type": "text" | |
| }, | |
| { | |
| "key": "X-Firebase-AppCheck", | |
| "value": "{{app_check_token}}", | |
| "type": "text" | |
| } | |
| ], | |
| "body": { | |
| "mode": "formdata", | |
| "formdata": [ | |
| { | |
| "key": "file", | |
| "type": "file", | |
| "src": [] | |
| } | |
| ] | |
| }, | |
| "url": { | |
| "raw": "{{base_url}}/colorize", | |
| "host": [ | |
| "{{base_url}}" | |
| ], | |
| "path": [ | |
| "colorize" | |
| ] | |
| }, | |
| "description": "Choose a grayscale (or any) image file in form-data 'file'. Returns download_url and result_id." | |
| } | |
| }, | |
| { | |
| "name": "Download Result (by result_id)", | |
| "request": { | |
| "method": "GET", | |
| "header": [ | |
| { | |
| "key": "Authorization", | |
| "value": "Bearer {{id_token}}", | |
| "type": "text" | |
| }, | |
| { | |
| "key": "X-Firebase-AppCheck", | |
| "value": "{{app_check_token}}", | |
| "type": "text" | |
| } | |
| ], | |
| "url": { | |
| "raw": "{{base_url}}/download/{{result_id}}", | |
| "host": [ | |
| "{{base_url}}" | |
| ], | |
| "path": [ | |
| "download", | |
| "{{result_id}}" | |
| ] | |
| }, | |
| "description": "Uses the result_id returned by the Colorize Image request." | |
| } | |
| }, | |
| { | |
| "name": "Get Result (public by filename)", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "url": { | |
| "raw": "{{base_url}}/results/{{filename}}", | |
| "host": [ | |
| "{{base_url}}" | |
| ], | |
| "path": [ | |
| "results", | |
| "{{filename}}" | |
| ] | |
| }, | |
| "description": "Direct public URL to image file; no auth required." | |
| } | |
| } | |
| , | |
| { | |
| "name": "Get Uploaded (public by filename)", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "url": { | |
| "raw": "{{base_url}}/uploads/{{filename}}", | |
| "host": [ | |
| "{{base_url}}" | |
| ], | |
| "path": [ | |
| "uploads", | |
| "{{filename}}" | |
| ] | |
| }, | |
| "description": "Direct public URL to uploaded image file; no auth required." | |
| } | |
| } | |
| ], | |
| "variable": [ | |
| { | |
| "key": "base_url", | |
| "value": "https://logicgoinfotechspaces-text-guided-image-colorization.hf.space" | |
| }, | |
| { | |
| "key": "firebase_api_key", | |
| "value": "AIzaSyBIB6rcfyyqy5niERTXWvVD714Ter4Vx68" | |
| }, | |
| { | |
| "key": "email", | |
| "value": "itisha.logico@gmail.com" | |
| }, | |
| { | |
| "key": "password", | |
| "value": "123456" | |
| }, | |
| { | |
| "key": "app_check_token", | |
| "value": "" | |
| }, | |
| { | |
| "key": "result_id", | |
| "value": "" | |
| }, | |
| { | |
| "key": "filename", | |
| "value": "" | |
| } | |
| ] | |
| } | |