Bỏ qua đến nội dung

Post Processing Solarize

Tích hợp

Id mô hình post-processing/solarize
# 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/post-processing/solarize?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "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"

Yêu cầu này: 0,001 $ 1 tín dụng API Chạy trên trang này

Lấy khóa API
Utility · Hình ảnh

Kết quả đầu tiên của bạn sẽ xuất hiện ở đây

Tạo một yêu cầu bên dưới và chạy bằng khóa API của bạn. Đầu ra được sao chép vào bộ lưu trữ của chúng tôi, giữ vĩnh viễn hoặc 7 ngày miễn phí.

Tạo một yêu cầu

Các điều khiển được tạo từ lược đồ mô hình. Mã và giá sẽ cập nhật khi bạn thay đổi chúng.

•bắt buộc image_url
Thả tệp hoặc

URL hình ảnh cần xử lý.

Nâng cao solarize_threshold
mặc định 0.5

Ngưỡng cho solarization.

POST /run/post-processing/solarize?wait=20 báo giá → 0,001 $
# 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/post-processing/solarize?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "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"

Chạy yêu cầu này

Key của bạn vẫn nằm trong trình duyệt này: key chỉ được gửi đến Doitong API và chỉ được lưu trong localStorage nếu bạn chọn Ghi nhớ. Nhận khóa API

Giới thiệu về Post Processing Solarize

Xử lý `image_url` và đảo các tông màu cao hơn `solarize_threshold`, từ 0 đến 1, mặc định 0.5. Đây là hiệu ứng một tham số để tạo vẻ cách điệu, đảo một phần.

Tham số

Gửi tên chuẩn hoặc tên gốc, không gửi cả hai. Tên chuẩn

TênKiểu Mặc địnhĐược phép Mô tả
image_urlbắt buộc image
Kiểuurl · image
URL hình ảnh cần xử lý.
solarize_thresholdtùy chọn
Kiểunumber
Mặc định0.5
0 – 1
Ngưỡng cho solarization.
bắt buộc Tên chuẩn, cũng được chấp nhận

Các tham số tệp nhận URL https:// công khai, URI data: tối đa 10 MB hoặc file_url của một tệp tải lên. Tệp

Đầu ra

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "post-processing/solarize",
  "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": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "image_url": "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",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ]
  },
  "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"
  }
}
Tệp của bạn, lựa chọn của bạnMỗi outputs[].url là một bản sao trên bộ lưu trữ của chúng tôi: được giữ vĩnh viễn (tính phí theo GB-tháng) hoặc 7 ngày miễn phí, theo cài đặt tài khoản hoặc ?storage=.
Cùng một cấu trúc trên mọi mô hìnhtype, url, content_type, width, height và duration cho hình ảnh, video và âm thanh. output là đối tượng kết quả riêng của mô hình.
Các trường đầu ra
images
array of object {url, content_type, file_name, file_size, width, height}Các hình ảnh sau khi áp dụng solarization.

Thêm mô hình: Chỉnh sửa hình ảnh

Dành cho tác nhân AI: trang này ở dạng Markdown tại https://doitong.com/vi/developers/models/post-processing/solarize.md. Tất cả mô hình và hướng dẫn: https://doitong.com/developers/llms.txt