tryiton 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c29cb70e6a0857471cb63749df6c190bb0d19c778069f7b03a24c20815732d6
4
- data.tar.gz: 1e2b498866ed7fa33d7c221f5a5b81ae5c377a5536b681a2c38838a23a3414e2
3
+ metadata.gz: '097cafef70c6dc514c07c210bab0ab6f14689de7dc2ad4a66117009e159831c6'
4
+ data.tar.gz: 814198bb65bfc55761267344ea53e35a334b02d19f5e92e6e0a79830c22373d3
5
5
  SHA512:
6
- metadata.gz: 3b3d0a9ec7b6b952364520a361001dff2a295d8a7f9a2059d1eb94919938eeba070765506f0d721849af0990e4b2435b35e2474eb57de9f1757cef8ff113f0f2
7
- data.tar.gz: 81d717005e65bbf86dca449c06535acfd464289bf62ee189d48ab449dd8ec732c392b2f4227b1814e7f61ffa00dbb0e862403963d6e227d14403894f2225a14e
6
+ metadata.gz: ffe674da6cc6caf4b03fd11e2cf4c9ba85c5c8ffec4f580bc657e3b62bfb4c7c8c5ff7d9c2ca44b14c5e845cd143badc28b5809a99f2242d7036c2cbc9130bc4
7
+ data.tar.gz: 9c905fe3606de104c25ff63ca180c6579c29ce334b4d4453ef176414faac2055a0011e3e1204acc4c1e51109905ae7116a0c7249630fa0afa4d74f568bfd65dc
data/README.md CHANGED
@@ -32,7 +32,7 @@ require "tryiton"
32
32
  client = Tryiton::Client.new(api_key: ENV["TRYITON_API_KEY"])
33
33
 
34
34
  # Submit a clothing try-on
35
- job_id = client.try_on_clothes(
35
+ job_id = client.try_on_fashion(
36
36
  model_image: "https://example.com/model.jpg",
37
37
  garment_image: "https://example.com/tshirt.jpg",
38
38
  category: "clothing",
@@ -48,13 +48,13 @@ Image inputs accept a public URL or a base64 data URL (`data:image/png;base64,..
48
48
 
49
49
  ## Core parameters
50
50
 
51
- `try_on_clothes` covers clothing and accessory try-on. The most important parameters:
51
+ `try_on_fashion` covers clothing and accessory try-on. The most important parameters:
52
52
 
53
53
  | Parameter | Type | Required | Description |
54
54
  | --------- | ---- | -------- | ----------- |
55
55
  | `model_image` | String | Yes | URL or base64 data URL of the person. |
56
56
  | `garment_image` | String | Yes | URL or base64 data URL of the garment or accessory. |
57
- | `category` | String | No | Item type: `auto`, `clothing`, `eyewear`, `footwear`, `headwear`, `jewelry`, or `accessories`. `auto` detects it for you. |
57
+ | `category` | String | No | Item type: `auto`, `clothing`, `eyewear`, `footwear`, `headwear`, `jewelry`, `accessories`, or `others`. `auto` detects it for you. |
58
58
  | `subcategory` | String | No | Required for `clothing` (`tops`, `bottoms`, `dresses`), `jewelry`, and `accessories`. |
59
59
 
60
60
  Additional options (`mode` and `moderation_level` for clothing; `num_samples` 1–4 and `output_format` `png`/`jpeg` for every try-on, including hairstyle and tattoo) are documented in the [API reference](https://docs.tryiton.now).
@@ -81,7 +81,7 @@ All failures raise `Tryiton::Error`, which carries the HTTP status code and the
81
81
 
82
82
  ```ruby
83
83
  begin
84
- client.try_on_clothes(...)
84
+ client.try_on_fashion(...)
85
85
  rescue Tryiton::Error => e
86
86
  puts "#{e.status} #{e.error_name} #{e.message}" # e.g. 429 OutOfCredits
87
87
  end
@@ -31,7 +31,7 @@ module Tryiton
31
31
  # Client for the TryItOn virtual try-on API.
32
32
  #
33
33
  # client = Tryiton::Client.new(api_key: ENV["TRYITON_API_KEY"])
34
- # job_id = client.try_on_clothes(
34
+ # job_id = client.try_on_fashion(
35
35
  # model_image: "https://example.com/model.jpg",
36
36
  # garment_image: "https://example.com/tshirt.jpg",
37
37
  # category: "clothing", subcategory: "tops"
@@ -54,8 +54,8 @@ module Tryiton
54
54
  # Keys: model_image (required), garment_image (required), category,
55
55
  # subcategory, mode, num_samples (1-4), output_format ("png"/"jpeg"),
56
56
  # moderation_level ("conservative"/"permissive"/"none").
57
- def try_on_clothes(**params)
58
- request(:post, "/tryon/clothes", params)["jobId"]
57
+ def try_on_fashion(**params)
58
+ request(:post, "/tryon/fashion", params)["jobId"]
59
59
  end
60
60
 
61
61
  # Restyle a person's hair. Returns the job id.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tryiton
4
- VERSION = "1.1.0"
4
+ VERSION = "2.0.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tryiton
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TryItOn