কনটেন্টে যান

Glm Image · Image to Image

ইন্টিগ্রেট করুন

মডেল id glm-image/image-to-image
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/glm-image/image-to-image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

এই অনুরোধ: ≈০.০৫$ ৫০ API ক্রেডিট এই পেজে চালান

API কী পান
Zhipu AI ছবি সম্পাদনা #image-to-image

এডিটিং, স্টাইল ট্রান্সফার এবং সর্বোচ্চ 4টি রেফারেন্স থেকে সামঞ্জস্যপূর্ণ চরিত্রের জন্য image-conditioned GLM ভ্যারিয়েন্ট

Zhipu AI · ছবি

আপনার প্রথম ফলাফল এখানে আসবে

নিচে একটি রিকোয়েস্ট তৈরি করে আপনার API কী দিয়ে চালান। আউটপুট আমাদের স্টোরেজে কপি করা হয়, চিরকাল বা বিনামূল্যে ৭ দিন পর্যন্ত রাখা হয়।

একটি অনুরোধ তৈরি করুন

মডেল স্কিমা থেকে কন্ট্রোল তৈরি করা হয়। এগুলো পরিবর্তন করলে কোড ও মূল্য আপডেট হয়।

•আবশ্যক

ছবি জেনারেশন নির্দেশকারী টেক্সট নির্দেশনা।

•আবশ্যক image_urls
একটি ফাইল ড্রপ করুন, অথবা

image-to-image জেনারেশনের জন্য ভিজ্যুয়াল কন্ডিশনিং প্রদানকারী সর্বোচ্চ 4টি ছবির URL, যার মধ্যে একাধিক ছবি থেকে নেওয়া রেফারেন্সও থাকতে পারে।

ডিফল্ট square_hd

আউটপুট ছবির মাত্রা।

num_images ডিফল্ট 1

উৎপাদন করার ছবির সংখ্যা।

অ্যাডভান্সড output_format · num_inference_steps · guidance_scale · seed · enable_safety_checker · enable_prompt_expansion
output_format ডিফল্ট jpeg

ফলস্বরূপ ছবির ফরম্যাট।

ডিফল্ট 30

ডিফিউশন denoising step count হিসেবে প্রকাশ করা ছবির গুণমান নিয়ন্ত্রণ; সাধারণত অতিরিক্ত step ব্যবহার করলে ফল উন্নত হয়।

ডিফল্ট 1.5

ক্লাসিফায়ার-ফ্রি গাইডেন্সের মাধ্যমে নিয়ন্ত্রিত প্রম্পট অনুসরণ; এই স্কেল বাড়ালে জেনারেশন আরও ঘনিষ্ঠভাবে প্রম্পটের সঙ্গে সামঞ্জস্যপূর্ণ হয়।

পুনরুৎপাদনযোগ্য ছবির জন্য র‍্যান্ডম seed: কোনো ছবি পুনরায় তৈরি করতে তার প্রম্পট ও seed দুটিই পুনরায় ব্যবহার করুন।

POST /run/glm-image/image-to-image?wait=20 মূল্য → ০.০৫$
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/glm-image/image-to-image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

এই অনুরোধ চালান

আপনার key এই ব্রাউজারেই থাকে: এটি শুধু Doitong API-তে পাঠানো হয় এবং Remember টিক দিলে কেবল localStorage-এ সংরক্ষিত হয়। একটি API কী পান

Glm Image · Image to Image সম্পর্কে

`image_urls`-এ থাকা কন্ডিশন ছবির সঙ্গে প্রম্পট ব্যবহার করে ছবি সম্পাদনা বা রূপান্তর করে; মাল্টি-ইমেজ রেফারেন্সের জন্য এতে সর্বোচ্চ 4টি URL দেওয়া যায়। টেক্সট সংস্করণের নিয়ন্ত্রণগুলোই এতে রয়েছে: `image_size` প্রিসেট, 10 থেকে 100 পর্যন্ত `num_inference_steps`, 1 থেকে 10 পর্যন্ত `guidance_scale`, `seed`, সর্বোচ্চ 4টি আউটপুট এবং jpeg অথবা png ফরম্যাট।

প্যারামিটার

ক্যানোনিকাল নাম অথবা নেটিভ নাম—দুটো একসঙ্গে নয়—পাঠান। ক্যানোনিকাল নামগুলো

নামধরন ডিফল্টঅনুমোদিত বিবরণ
promptআবশ্যক
ধরনstring
ছবি জেনারেশন নির্দেশকারী টেক্সট নির্দেশনা।
image_sizeঐচ্ছিক
ধরনobject
ডিফল্টsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9portrait_3_2landscape_3_2portrait_hdlandscape_hd
আউটপুট ছবির মাত্রা।
num_inference_stepsঐচ্ছিক
ধরনinteger
ডিফল্ট30
১০ – ১০০
ডিফিউশন denoising step count হিসেবে প্রকাশ করা ছবির গুণমান নিয়ন্ত্রণ; সাধারণত অতিরিক্ত step ব্যবহার করলে ফল উন্নত হয়।
guidance_scaleঐচ্ছিক
ধরনnumber
ডিফল্ট1.5
১ – ১০
ক্লাসিফায়ার-ফ্রি গাইডেন্সের মাধ্যমে নিয়ন্ত্রিত প্রম্পট অনুসরণ; এই স্কেল বাড়ালে জেনারেশন আরও ঘনিষ্ঠভাবে প্রম্পটের সঙ্গে সামঞ্জস্যপূর্ণ হয়।
seedঐচ্ছিক
ধরনinteger | null
পুনরুৎপাদনযোগ্য ছবির জন্য র‍্যান্ডম seed: কোনো ছবি পুনরায় তৈরি করতে তার প্রম্পট ও seed দুটিই পুনরায় ব্যবহার করুন।
num_imagesঐচ্ছিক num_outputs
ধরনinteger
ডিফল্ট1
১ – ৪
উৎপাদন করার ছবির সংখ্যা।
enable_safety_checkerঐচ্ছিক
ধরনboolean
ডিফল্টtrue
জেনারেট করা ছবির NSFW স্ক্রিনিং নিয়ন্ত্রণ; অনিরাপদ হিসেবে চিহ্নিত যেকোনো ছবি কালো ছবি দিয়ে প্রতিস্থাপিত হয়। শুধু অনুমোদিত অ্যাকাউন্ট স্ক্রিনিং নিষ্ক্রিয় করতে পারে, তাই সেই অনুমোদন না থাকা রিকোয়েস্ট এই সেটিং নির্বিশেষে পরীক্ষা করা হয়।
output_formatঐচ্ছিক
ধরনenum
ডিফল্টjpeg
jpegpng
ফলস্বরূপ ছবির ফরম্যাট।
enable_prompt_expansionঐচ্ছিক
ধরনboolean
ডিফল্টfalse
LLM-ভিত্তিক প্রম্পট সম্প্রসারণ, True দ্বারা সক্রিয় হয়, যা জেনারেট করা ফলের বিস্তারিত ও গুণমান উন্নত করে।
image_urlsআবশ্যক images
ধরনurl[] · image
image-to-image জেনারেশনের জন্য ভিজ্যুয়াল কন্ডিশনিং প্রদানকারী সর্বোচ্চ 4টি ছবির URL, যার মধ্যে একাধিক ছবি থেকে নেওয়া রেফারেন্সও থাকতে পারে।
আবশ্যক ক্যানোনিকাল নাম, এটিও গ্রহণযোগ্য

ফাইল প্যারামিটার হিসেবে একটি পাবলিক https:// URL, 10 MB পর্যন্ত একটি data: URI, অথবা আপলোডের file_url গ্রহণ করা হয়। ফাইল

আউটপুট

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "glm-image/image-to-image",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 50,
    "usd": "0.05",
    "charged": 50,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ]
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "width": 1024,
        "height": 768,
        "content_type": "image/jpeg"
      }
    ],
    "timings": {},
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
আপনার ফাইল, আপনার পছন্দপ্রতিটি outputs[].url আমাদের স্টোরেজে একটি কপি: চিরকাল রাখা হয় (প্রতি GB-মাস অনুযায়ী অর্থপ্রদত্ত) অথবা অ্যাকাউন্ট সেটিংস বা ?storage= অনুযায়ী বিনামূল্যে ৭ দিন পর্যন্ত।
প্রতিটি মডেলে একই গঠনছবি, ভিডিও এবং অডিও—সব ক্ষেত্রেই type, url, content_type, width, height এবং duration। output হলো মডেলের নিজস্ব ফলাফল অবজেক্ট।
আউটপুটের ফিল্ড
images
array of object {url, width, height, content_type}জেনারেট করা ছবির URL-সমৃদ্ধ তালিকা।
timings
object
seed
integerছবি-জেনারেশনের সিড, যার মধ্যে ইনপুটে সিড না থাকলে এলোমেলোভাবে নির্বাচিত মানটিও অন্তর্ভুক্ত; অন্যথায় প্রদত্ত মানটি পুনরাবৃত্তি করে।
has_nsfw_concepts
array of booleanজেনারেট করা ছবিতে NSFW ধারণা রয়েছে কি না নির্দেশ করে।
prompt
stringছবি জেনারেশনের সময় ব্যবহৃত প্রম্পট।

আরও মডেল: ছবি সম্পাদনা

AI এজেন্টদের জন্য: এই পৃষ্ঠাটি Markdown হিসেবে এখানে আছে https://doitong.com/bn/developers/models/glm-image/image-to-image.md. সব মডেল ও গাইড: https://doitong.com/developers/llms.txt