PicassoIA Image Editor Pro
प्रॉम्प्ट के अनुसार एक से चार इमेज को एडिट करता है या आपस में जोड़ता है: कपड़े या कोई रंग बदलें, चीज़ें जोड़ें या हटाएँ, या एक इमेज के हिस्से दूसरी इमेज में डालें।
curl -s -X POST https://api.picassoia.com/v1/models/picassoia/picassoia-image-editor-pro/predictions \ -H "Authorization: Bearer $PICASSOIA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"input":{"prompt":"put the cat from image 1 on the sofa from image 2","images":["https://example.com/cat.png","https://example.com/sofa.jpg"]}}'इसे कॉल कैसे करें
एक रन में तीन रिक्वेस्ट लगती हैं: प्रेडिक्शन बनाना, पूरा होने तक उसे पोल करना और नतीजा पढ़ना। नीचे दिया गया कोड और जवाब इसी मॉडल और आपके चुने हुए मोड के लिए हैं।
शुरू करने से पहले
एक API key बनाएँ और उसे अपने सर्वर पर PICASSOIA_API_KEY एनवायरनमेंट वेरिएबल में रखें। हर रिक्वेस्ट उसे Authorization हेडर में भेजती है।
प्रेडिक्शन बनाएँ
इनपुट को एक POST में भेजें। API नतीजे का इंतज़ार किए बिना तुरंत
201जवाब देता है: प्रेडिक्शनstartingस्टेट में होता है,etaमें एक अनुमान होता है औरurls.getमें वह पता होता है जिसे पोल करना है।रिक्वेस्टcurl -s -X POST https://api.picassoia.com/v1/models/picassoia/picassoia-image-editor-pro/predictions \ -H "Authorization: Bearer $PICASSOIA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"input":{"prompt":"put the cat from image 1 on the sofa from image 2","images":["https://example.com/cat.png","https://example.com/sofa.jpg"]}}'जवाब · 201 Createdstarting{ "id": "api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60", "model": "picassoia/picassoia-image-editor-pro", "input": { "prompt": "put the cat from image 1 on the sofa from image 2", "images": [ "https://example.com/cat.png", "https://example.com/sofa.jpg" ], "aspect_ratio": "match_input_image", "num_outputs": 1, "output_format": "webp", "output_quality": 95 }, "output": null, "error": null, "status": "starting", "created_at": "2026-10-01T09:30:00.000Z", "started_at": null, "completed_at": null, "metrics": { "predict_time": null }, "urls": { "get": "https://api.picassoia.com/v1/predictions/api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60", "cancel": "https://api.picassoia.com/v1/predictions/api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60/cancel" }, "eta": { "seconds": 12, "next_poll_in_seconds": 6 } }पूरा होने तक इसे पोल करें
eta.next_poll_in_secondsसेकंड बादurls.getपर दोबारा रिक्वेस्ट भेजें: अनुमानित समय के आधे पर, अनुमानित समय पूरा होने पर, और उसके बाद हर 2 सेकंड में। इससे ज़्यादा तेज़ी से पोल करने पर नतीजा जल्दी नहीं मिलता।स्टेटस:
startingprocessingsucceeded·failed·canceledरिक्वेस्ट# Repeat after eta.next_poll_in_seconds until status is # succeeded, failed or canceled. curl -s https://api.picassoia.com/v1/predictions/api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60 \ -H "Authorization: Bearer $PICASSOIA_API_KEY"जवाब · 200 OK · प्रगति मेंprocessing{ "id": "api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60", "status": "processing", "output": null, "eta": { "seconds": 6, "next_poll_in_seconds": 6 } }सिर्फ़ बदलने वाले फ़ील्ड दिखाए गए हैं; बाकी चरण 1 जैसे ही हैं।
नतीजा पढ़ें
जब
statussucceededहो, तोoutputइमेज URL की एक सूची होता है। जिन फ़ाइलों को आप रखना चाहते हैं, उन्हें डाउनलोड कर लें।अगर
statusfailedहो, तोerrorबताता है कि क्यों;canceledका मतलब है कि पूरा होने से पहले इसे रद्द कर दिया गया। ये तीनों स्टेटस अंतिम हैं: इसके बाद प्रेडिक्शन फिर कभी नहीं बदलता।रिक्वेस्ट# The last poll holds the result: "output" when "status" is succeeded, # "error" when it is failed. With jq, just those three fields: curl -s https://api.picassoia.com/v1/predictions/api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60 \ -H "Authorization: Bearer $PICASSOIA_API_KEY" | jq '.status, .output, .error'जवाब · 200 OK · पूरा हुआsucceeded{ "id": "api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60", "status": "succeeded", "output": [ "https://…/output-1.webp" ], "error": null, "completed_at": "2026-10-01T09:30:08.000Z", "metrics": { "predict_time": 6.4 }, "eta": null }सिर्फ़ बदलने वाले फ़ील्ड दिखाए गए हैं; बाकी चरण 1 जैसे ही हैं।
इन जवाबों में दिए गए ID, समय और URL सिर्फ़ उदाहरण हैं: आपके अपने मान हर जवाब में आते हैं।
API में यह मॉडल
POST के साथ एक प्रेडिक्शन बनाएँ, फिर पूरा होने तक उसे पोल करें। ये मॉडल के इनपुट हैं:
एंडपॉइंट
POST https://api.picassoia.com/v1/models/picassoia/picassoia-image-editor-pro/predictionspicassoia/picassoia-image-editor-pro
आउटपुट: 1 या 2 इमेज URL की सूची।
अन्य प्रोवाइडर से तुलना करें
देखें कि उसी नाम के मॉडल के लिए अन्य प्रोवाइडर जितना चार्ज करते हैं, उसके मुकाबले हमारी कीमतें कैसी हैं।
| मॉडल | Picasso IA | अन्य प्रोवाइडर |
|---|---|---|
| PicassoIA Image Editor Pro · इमेज एडिटिंग | असीमित$0 प्रति रिक्वेस्ट | $0.03/मेगापिक्सेल |
यह तुलना 1 अक्टूबर 2026 तक अन्य प्रोवाइडर की सार्वजनिक कीमतों पर आधारित है। Picasso IA पर Infinite प्लान के साथ API प्रेडिक्शन मुफ़्त हैं, और एक साथ ज़्यादा से ज़्यादा 5 प्रेडिक्शन प्रगति में रह सकते हैं।