मुफ़्त शुरू
इमेजटेक्स्ट से इमेजअसीमित$0 प्रति रिक्वेस्ट

PicassoIA Image

एक प्रॉम्प्ट से एक या दो इमेज बनाता है, सात आस्पेक्ट रेशियो में और JPG, WebP या PNG में। किसी नतीजे को दोबारा पाने के लिए एक सीड सेट करें।

मॉडल आज़माएँडॉक्यूमेंटेशन देखें
curl -s -X POST https://api.picassoia.com/v1/models/picassoia/picassoia-image/predictions \  -H "Authorization: Bearer $PICASSOIA_API_KEY" \  -H "Content-Type: application/json" \  -d '{"input":{"prompt":"a lighthouse at sunset, oil painting"}}'

इसे कॉल कैसे करें

एक रन में तीन रिक्वेस्ट लगती हैं: प्रेडिक्शन बनाना, पूरा होने तक उसे पोल करना और नतीजा पढ़ना। नीचे दिया गया कोड और जवाब इसी मॉडल और आपके चुने हुए मोड के लिए हैं।

शुरू करने से पहले

एक API key बनाएँ और उसे अपने सर्वर पर PICASSOIA_API_KEY एनवायरनमेंट वेरिएबल में रखें। हर रिक्वेस्ट उसे Authorization हेडर में भेजती है।

अपनी API key पाएँ
  1. प्रेडिक्शन बनाएँ

    इनपुट को एक POST में भेजें। API नतीजे का इंतज़ार किए बिना तुरंत 201 जवाब देता है: प्रेडिक्शन starting स्टेट में होता है, eta में एक अनुमान होता है और urls.get में वह पता होता है जिसे पोल करना है।

    रिक्वेस्ट
    curl -s -X POST https://api.picassoia.com/v1/models/picassoia/picassoia-image/predictions \
      -H "Authorization: Bearer $PICASSOIA_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"prompt":"a lighthouse at sunset, oil painting"}}'
    जवाब · 201 Createdstarting
    {
      "id": "api_3f9c2b7e8d1a4c6f9e0b1a2c3d4e5f60",
      "model": "picassoia/picassoia-image",
      "input": {
        "prompt": "a lighthouse at sunset, oil painting",
        "aspect_ratio": "1:1",
        "num_outputs": 1,
        "output_format": "jpg",
        "output_quality": 80
      },
      "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
      }
    }
  2. पूरा होने तक इसे पोल करें

    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 जैसे ही हैं।

  3. नतीजा पढ़ें

    जब status succeeded हो, तो output इमेज URL की एक सूची होता है। जिन फ़ाइलों को आप रखना चाहते हैं, उन्हें डाउनलोड कर लें।

    अगर status failed हो, तो 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.jpg"
      ],
      "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/predictions

picassoia/picassoia-image

फ़ील्डटाइपडिफ़ॉल्टनोट्स
promptstring, 1–4000 कैरेक्टरज़रूरीइमेज में क्या दिखना चाहिए।
aspect_ratio1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:31:1
num_outputsinteger, 1–21कितनी इमेज बनानी हैं।
output_formatwebp, jpg, pngjpg
output_qualityinteger, 0–10080सिर्फ़ JPG और WebP के लिए।
seedintegerरैंडमकिसी नतीजे को दोबारा पाने के लिए इसे सेट करें।

आउटपुट: 1 या 2 इमेज URL की सूची।

पूरा API संदर्भ खोलें

अन्य प्रोवाइडर से तुलना करें

देखें कि उसी नाम के मॉडल के लिए अन्य प्रोवाइडर जितना चार्ज करते हैं, उसके मुकाबले हमारी कीमतें कैसी हैं।

मॉडलPicasso IAअन्य प्रोवाइडर
PicassoIA Image · टेक्स्ट से इमेजअसीमित$0 प्रति रिक्वेस्ट$0.02/मेगापिक्सेल

यह तुलना 1 अक्टूबर 2026 तक अन्य प्रोवाइडर की सार्वजनिक कीमतों पर आधारित है। Picasso IA पर Infinite प्लान के साथ API प्रेडिक्शन मुफ़्त हैं, और एक साथ ज़्यादा से ज़्यादा 5 प्रेडिक्शन प्रगति में रह सकते हैं।