runapi-flux-kontext 0.2.7 → 0.2.9

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: 375bd55954b0fcc6fc0af7cb22d3102a67e40b216aebb3f7036f88235854a1cf
4
- data.tar.gz: bb1146e64a121ed83e2315925dcdccf108d9937f08cafdff698bed0ba1d03bbc
3
+ metadata.gz: 03aad061553d4546b2bd058a4e8d8b0ae2ee34eb22849968ffe2bfa9ada25ebc
4
+ data.tar.gz: 30b8726743e49e7eb830ebdfd3a57dfd4e3840dc781fdc3d7705c9092dca1871
5
5
  SHA512:
6
- metadata.gz: c1ba0956ecaac80618fefbb20fa3838b2db99e7ad74905b70922e0376fab40beb1f60cb74132570411bb5f13900d9069dd9ab7ba8d07cf58e615bae407d5cd4b
7
- data.tar.gz: eb9fac4245227b237775a761c98d4b9c76338e8f05a53682a704eef9d3019fe6ae0194e417c97b4c5f3345d77fb1f944fbec1e2efbe320271260be59ce65334d
6
+ metadata.gz: 9e0fb9b2ddae3d38e023783a952ddefb1a9141ad5745dc0983bac599d802f516d384accd487d72f0b33b98c47ab1317acf87b3959b10c2a75c864f0682a9adc3
7
+ data.tar.gz: e99b8f0665fee2b7383bb8e0233a12063b64bf4dd5582a7fbe95be150eb59999f80fcc82ff2418f99bd5af29396445dbd13ea6e2006b376e2335404845f83e1c
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Flux Kontext Ruby SDK is the language-specific package for Flux Kontext on RunAPI. Use this package for image generation, image editing, and creative production workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Ruby.
4
4
 
5
- This README is the Ruby package guide inside the public `flux-kontext-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/flux-kontext; for API reference, use https://runapi.ai/docs#flux-kontext; for SDK docs, use https://runapi.ai/docs#sdk-flux-kontext.
5
+ This README is the Ruby package guide inside the public `flux-kontext-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/flux-kontext; for API reference, use https://runapi.ai/docs/api/flux-kontext/text-to-image; for SDK docs, use https://runapi.ai/docs/resources/sdks.
6
6
 
7
7
  ## Install
8
8
 
@@ -13,11 +13,11 @@ gem install runapi-flux-kontext
13
13
  ## Quick start
14
14
 
15
15
  ```ruby
16
- require "runapi-flux-kontext"
16
+ require "runapi/flux_kontext"
17
17
 
18
18
  client = RunApi::FluxKontext::Client.new
19
19
  task = client.text_to_image.create(
20
- # Pass the Flux Kontext JSON request body from https://runapi.ai/docs#flux-kontext.
20
+ # Pass the Flux Kontext JSON request body from https://runapi.ai/docs/api/flux-kontext/text-to-image.
21
21
  )
22
22
  status = client.text_to_image.get(task.id)
23
23
  ```
@@ -33,8 +33,8 @@ Use Ruby keyword arguments and the `RunApi::FluxKontext` error classes when buil
33
33
  ## Links
34
34
 
35
35
  - Model page: https://runapi.ai/models/flux-kontext
36
- - SDK docs: https://runapi.ai/docs#sdk-flux-kontext
37
- - Product docs: https://runapi.ai/docs#flux-kontext
36
+ - SDK docs: https://runapi.ai/docs/resources/sdks
37
+ - Product docs: https://runapi.ai/docs/api/flux-kontext/text-to-image
38
38
  - Pricing and rate limits: https://runapi.ai/models/flux-kontext/pro
39
39
  - Provider comparison: https://runapi.ai/providers/black-forest-labs
40
40
  - Full catalog: https://runapi.ai/models
@@ -21,27 +21,27 @@ module RunApi
21
21
  #
22
22
  # @param params [Hash] generation parameters
23
23
  # @return [RunApi::FluxKontext::Types::CompletedTextToImageResponse] completed generation with images
24
- def run(**params)
25
- task = create(**params)
26
- poll_until_complete { get(task.id) }
24
+ def run(options: nil, **params)
25
+ task = create(options: options, **params)
26
+ poll_until_complete { get(task.id, options: options) }
27
27
  end
28
28
 
29
29
  # Create an image generation task.
30
30
  #
31
31
  # @param params [Hash] generation parameters
32
32
  # @return [RunApi::FluxKontext::Types::TextToImageResponse] task creation result with id
33
- def create(**params)
33
+ def create(options: nil, **params)
34
34
  params = compact_params(params)
35
35
  validate_contract!(CONTRACT["text-to-image"], params)
36
- request(:post, ENDPOINT, body: params)
36
+ request(:post, ENDPOINT, body: params, options: options)
37
37
  end
38
38
 
39
39
  # Get generation status by task ID.
40
40
  #
41
41
  # @param id [String] task ID
42
42
  # @return [RunApi::FluxKontext::Types::TextToImageResponse] current generation status
43
- def get(id)
44
- request(:get, "#{ENDPOINT}/#{id}")
43
+ def get(id, options: nil)
44
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
45
45
  end
46
46
  end
47
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-flux-kontext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.2.7
18
+ version: 0.4.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.2.7
25
+ version: 0.4.0
26
26
  description: The Flux Kontext Ruby SDK is the language-specific package for Flux Kontext
27
27
  on RunAPI. Use this package for image generation, image editing, and creative production
28
28
  workflows when your application needs request bodies, task status lookup, and consistent