venice_client 1.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 +7 -0
- data/Gemfile +9 -0
- data/README.md +510 -0
- data/Rakefile +8 -0
- data/docs/APIKeysApi.md +334 -0
- data/docs/AnyOfChatCompletionRequestMessagesItems.md +6 -0
- data/docs/AnyOfChatCompletionRequestStop.md +6 -0
- data/docs/AnyOfChatCompletionRequestToolChoice.md +6 -0
- data/docs/AnyOfCreateEmbeddingRequestSchemaInput.md +6 -0
- data/docs/AnyOfCreateEmbeddingRequestSchemaModel.md +6 -0
- data/docs/AnyOfModelResponseModelSpecConstraints.md +6 -0
- data/docs/AnyOfModelResponseModelSpecPricing.md +6 -0
- data/docs/AnyOfUpscaleImageRequestEnhance.md +6 -0
- data/docs/AnyOfUpscaleImageRequestImage.md +6 -0
- data/docs/AnyOfapiKeysBodyExpiresAt.md +6 -0
- data/docs/AnyOfapiKeysConsumptionLimitUsd.md +6 -0
- data/docs/AnyOfapiKeysConsumptionLimitVcu.md +6 -0
- data/docs/AnyOfapiKeysGenerateWeb3KeyBodyExpiresAt.md +6 -0
- data/docs/AnyOfinlineResponse2002DataItems.md +6 -0
- data/docs/AnyOfinlineResponse2004Type.md +6 -0
- data/docs/AnyOfinlineResponse2005Type.md +6 -0
- data/docs/AnyOfinlineResponse2006Type.md +6 -0
- data/docs/AnyOfinlineResponse200ChoicesMessage.md +6 -0
- data/docs/AnyOfinlineResponse200PromptLogprobs.md +6 -0
- data/docs/ApiKeysBody.md +10 -0
- data/docs/ApiKeysConsumptionLimit.md +8 -0
- data/docs/ApiKeysGenerateWeb3KeyBody.md +13 -0
- data/docs/AudioApi.md +58 -0
- data/docs/BillingApi.md +70 -0
- data/docs/BillingUsageRequest.md +12 -0
- data/docs/BillingUsageResponse.md +8 -0
- data/docs/BillingUsageResponseData.md +14 -0
- data/docs/BillingUsageResponseInferenceDetails.md +10 -0
- data/docs/BillingUsageResponsePagination.md +10 -0
- data/docs/CharactersApi.md +52 -0
- data/docs/ChatApi.md +60 -0
- data/docs/ChatCompletionRequest.md +32 -0
- data/docs/ChatCompletionRequestFunction.md +9 -0
- data/docs/ChatCompletionRequestStreamOptions.md +7 -0
- data/docs/ChatCompletionRequestVeniceParameters.md +12 -0
- data/docs/CreateEmbeddingRequestSchema.md +11 -0
- data/docs/CreateSpeechRequestSchema.md +12 -0
- data/docs/EmbeddingsApi.md +60 -0
- data/docs/GenerateImageRequest.md +22 -0
- data/docs/ImageApi.md +270 -0
- data/docs/InlineResponse200.md +14 -0
- data/docs/InlineResponse2001.md +10 -0
- data/docs/InlineResponse20010.md +7 -0
- data/docs/InlineResponse20010Data.md +12 -0
- data/docs/InlineResponse20010DataApiTier.md +8 -0
- data/docs/InlineResponse20010DataBalances.md +8 -0
- data/docs/InlineResponse20010DataRateLimits.md +8 -0
- data/docs/InlineResponse20010DataRateLimits1.md +8 -0
- data/docs/InlineResponse20011.md +8 -0
- data/docs/InlineResponse20011Data.md +11 -0
- data/docs/InlineResponse20012.md +8 -0
- data/docs/InlineResponse20012Data.md +7 -0
- data/docs/InlineResponse20013.md +8 -0
- data/docs/InlineResponse20013Data.md +16 -0
- data/docs/InlineResponse20013Stats.md +7 -0
- data/docs/InlineResponse20014.md +10 -0
- data/docs/InlineResponse20014Data.md +9 -0
- data/docs/InlineResponse20014Usage.md +8 -0
- data/docs/InlineResponse20015.md +8 -0
- data/docs/InlineResponse2001Timing.md +10 -0
- data/docs/InlineResponse2002.md +8 -0
- data/docs/InlineResponse2003.md +8 -0
- data/docs/InlineResponse2004.md +9 -0
- data/docs/InlineResponse2005.md +9 -0
- data/docs/InlineResponse2006.md +9 -0
- data/docs/InlineResponse2007.md +8 -0
- data/docs/InlineResponse2007Data.md +15 -0
- data/docs/InlineResponse2007Usage.md +7 -0
- data/docs/InlineResponse2007UsageTrailingSevenDays.md +8 -0
- data/docs/InlineResponse2008.md +8 -0
- data/docs/InlineResponse2008Data.md +12 -0
- data/docs/InlineResponse2009.md +7 -0
- data/docs/InlineResponse200Choices.md +11 -0
- data/docs/InlineResponse200Logprobs.md +10 -0
- data/docs/InlineResponse200LogprobsTopLogprobs.md +9 -0
- data/docs/InlineResponse200Usage.md +10 -0
- data/docs/InlineResponse200VeniceParameters.md +13 -0
- data/docs/InlineResponse200VeniceParametersWebSearchCitations.md +10 -0
- data/docs/InlineResponse400.md +8 -0
- data/docs/InlineResponse401.md +7 -0
- data/docs/InlineResponse402.md +7 -0
- data/docs/InlineResponse403.md +7 -0
- data/docs/InlineResponse415.md +7 -0
- data/docs/InlineResponse429.md +7 -0
- data/docs/InlineResponse500.md +7 -0
- data/docs/InlineResponse5001.md +7 -0
- data/docs/InlineResponse503.md +7 -0
- data/docs/ModelCompatibilitySchema.md +6 -0
- data/docs/ModelResponse.md +12 -0
- data/docs/ModelResponseModelSpec.md +15 -0
- data/docs/ModelResponseModelSpecCapabilities.md +14 -0
- data/docs/ModelTraitSchema.md +6 -0
- data/docs/ModelsApi.md +160 -0
- data/docs/OneOfChatCompletionRequestResponseFormat.md +6 -0
- data/docs/PreviewApi.md +52 -0
- data/docs/SimpleGenerateImageRequest.md +18 -0
- data/docs/SpeechApi.md +58 -0
- data/docs/ToolCall.md +9 -0
- data/docs/Type.md +6 -0
- data/docs/UpscaleImageRequest.md +12 -0
- data/git_push.sh +55 -0
- data/lib/venice_client/api/api_keys_api.rb +381 -0
- data/lib/venice_client/api/audio_api.rb +74 -0
- data/lib/venice_client/api/billing_api.rb +97 -0
- data/lib/venice_client/api/characters_api.rb +70 -0
- data/lib/venice_client/api/chat_api.rb +77 -0
- data/lib/venice_client/api/embeddings_api.rb +81 -0
- data/lib/venice_client/api/image_api.rb +314 -0
- data/lib/venice_client/api/models_api.rb +185 -0
- data/lib/venice_client/api/preview_api.rb +70 -0
- data/lib/venice_client/api/speech_api.rb +74 -0
- data/lib/venice_client/api_client.rb +388 -0
- data/lib/venice_client/api_error.rb +56 -0
- data/lib/venice_client/configuration.rb +204 -0
- data/lib/venice_client/models/any_of_chat_completion_request_messages_items.rb +197 -0
- data/lib/venice_client/models/any_of_chat_completion_request_stop.rb +197 -0
- data/lib/venice_client/models/any_of_chat_completion_request_tool_choice.rb +197 -0
- data/lib/venice_client/models/any_of_create_embedding_request_schema_input.rb +197 -0
- data/lib/venice_client/models/any_of_create_embedding_request_schema_model.rb +197 -0
- data/lib/venice_client/models/any_of_model_response_model_spec_constraints.rb +197 -0
- data/lib/venice_client/models/any_of_model_response_model_spec_pricing.rb +197 -0
- data/lib/venice_client/models/any_of_upscale_image_request_enhance.rb +197 -0
- data/lib/venice_client/models/any_of_upscale_image_request_image.rb +197 -0
- data/lib/venice_client/models/any_ofapi_keys_body_expires_at.rb +197 -0
- data/lib/venice_client/models/any_ofapi_keys_consumption_limit_usd.rb +197 -0
- data/lib/venice_client/models/any_ofapi_keys_consumption_limit_vcu.rb +195 -0
- data/lib/venice_client/models/any_ofapi_keys_generate_web3_key_body_expires_at.rb +197 -0
- data/lib/venice_client/models/any_ofinline_response_200_2_data_items.rb +197 -0
- data/lib/venice_client/models/any_ofinline_response_200_4_type.rb +197 -0
- data/lib/venice_client/models/any_ofinline_response_200_5_type.rb +197 -0
- data/lib/venice_client/models/any_ofinline_response_200_6_type.rb +197 -0
- data/lib/venice_client/models/any_ofinline_response_200_choices_message.rb +197 -0
- data/lib/venice_client/models/any_ofinline_response_200_prompt_logprobs.rb +197 -0
- data/lib/venice_client/models/api_keys_body.rb +281 -0
- data/lib/venice_client/models/api_keys_consumption_limit.rb +228 -0
- data/lib/venice_client/models/api_keys_generate_web3_key_body.rb +322 -0
- data/lib/venice_client/models/billing_usage_request.rb +309 -0
- data/lib/venice_client/models/billing_usage_response.rb +228 -0
- data/lib/venice_client/models/billing_usage_response_data.rb +350 -0
- data/lib/venice_client/models/billing_usage_response_inference_details.rb +262 -0
- data/lib/venice_client/models/billing_usage_response_pagination.rb +253 -0
- data/lib/venice_client/models/chat_completion_request.rb +483 -0
- data/lib/venice_client/models/chat_completion_request_function.rb +231 -0
- data/lib/venice_client/models/chat_completion_request_stream_options.rb +207 -0
- data/lib/venice_client/models/chat_completion_request_venice_parameters.rb +302 -0
- data/lib/venice_client/models/create_embedding_request_schema.rb +294 -0
- data/lib/venice_client/models/create_speech_request_schema.rb +331 -0
- data/lib/venice_client/models/generate_image_request.rb +420 -0
- data/lib/venice_client/models/inline_response_200.rb +341 -0
- data/lib/venice_client/models/inline_response_200_1.rb +254 -0
- data/lib/venice_client/models/inline_response_200_10.rb +211 -0
- data/lib/venice_client/models/inline_response_200_10_data.rb +287 -0
- data/lib/venice_client/models/inline_response_200_10_data_api_tier.rb +227 -0
- data/lib/venice_client/models/inline_response_200_10_data_balances.rb +217 -0
- data/lib/venice_client/models/inline_response_200_10_data_rate_limits.rb +227 -0
- data/lib/venice_client/models/inline_response_200_10_data_rate_limits_1.rb +223 -0
- data/lib/venice_client/models/inline_response_200_11.rb +262 -0
- data/lib/venice_client/models/inline_response_200_11_data.rb +274 -0
- data/lib/venice_client/models/inline_response_200_12.rb +225 -0
- data/lib/venice_client/models/inline_response_200_12_data.rb +212 -0
- data/lib/venice_client/models/inline_response_200_13.rb +261 -0
- data/lib/venice_client/models/inline_response_200_13_data.rb +350 -0
- data/lib/venice_client/models/inline_response_200_13_stats.rb +212 -0
- data/lib/venice_client/models/inline_response_200_14.rb +292 -0
- data/lib/venice_client/models/inline_response_200_14_data.rb +278 -0
- data/lib/venice_client/models/inline_response_200_14_usage.rb +228 -0
- data/lib/venice_client/models/inline_response_200_15.rb +228 -0
- data/lib/venice_client/models/inline_response_200_1_timing.rb +257 -0
- data/lib/venice_client/models/inline_response_200_2.rb +228 -0
- data/lib/venice_client/models/inline_response_200_3.rb +262 -0
- data/lib/venice_client/models/inline_response_200_4.rb +277 -0
- data/lib/venice_client/models/inline_response_200_5.rb +274 -0
- data/lib/venice_client/models/inline_response_200_6.rb +274 -0
- data/lib/venice_client/models/inline_response_200_7.rb +262 -0
- data/lib/venice_client/models/inline_response_200_7_data.rb +357 -0
- data/lib/venice_client/models/inline_response_200_7_usage.rb +211 -0
- data/lib/venice_client/models/inline_response_200_7_usage_trailing_seven_days.rb +227 -0
- data/lib/venice_client/models/inline_response_200_8.rb +225 -0
- data/lib/venice_client/models/inline_response_200_8_data.rb +316 -0
- data/lib/venice_client/models/inline_response_200_9.rb +211 -0
- data/lib/venice_client/models/inline_response_200_choices.rb +312 -0
- data/lib/venice_client/models/inline_response_200_logprobs.rb +251 -0
- data/lib/venice_client/models/inline_response_200_logprobs_top_logprobs.rb +236 -0
- data/lib/venice_client/models/inline_response_200_usage.rb +253 -0
- data/lib/venice_client/models/inline_response_200_venice_parameters.rb +329 -0
- data/lib/venice_client/models/inline_response_200_venice_parameters_web_search_citations.rb +243 -0
- data/lib/venice_client/models/inline_response_400.rb +222 -0
- data/lib/venice_client/models/inline_response_401.rb +212 -0
- data/lib/venice_client/models/inline_response_402.rb +212 -0
- data/lib/venice_client/models/inline_response_403.rb +212 -0
- data/lib/venice_client/models/inline_response_415.rb +212 -0
- data/lib/venice_client/models/inline_response_429.rb +212 -0
- data/lib/venice_client/models/inline_response_500.rb +212 -0
- data/lib/venice_client/models/inline_response_500_1.rb +212 -0
- data/lib/venice_client/models/inline_response_503.rb +212 -0
- data/lib/venice_client/models/model_compatibility_schema.rb +202 -0
- data/lib/venice_client/models/model_response.rb +340 -0
- data/lib/venice_client/models/model_response_model_spec.rb +292 -0
- data/lib/venice_client/models/model_response_model_spec_capabilities.rb +352 -0
- data/lib/venice_client/models/model_trait_schema.rb +200 -0
- data/lib/venice_client/models/one_of_chat_completion_request_response_format.rb +197 -0
- data/lib/venice_client/models/simple_generate_image_request.rb +456 -0
- data/lib/venice_client/models/tool_call.rb +230 -0
- data/lib/venice_client/models/type.rb +198 -0
- data/lib/venice_client/models/upscale_image_request.rb +270 -0
- data/lib/venice_client/version.rb +14 -0
- data/lib/venice_client.rb +139 -0
- data/spec/api/api_keys_api_spec.rb +113 -0
- data/spec/api/audio_api_spec.rb +45 -0
- data/spec/api/billing_api_spec.rb +51 -0
- data/spec/api/characters_api_spec.rb +44 -0
- data/spec/api/chat_api_spec.rb +46 -0
- data/spec/api/embeddings_api_spec.rb +46 -0
- data/spec/api/image_api_spec.rb +99 -0
- data/spec/api/models_api_spec.rb +69 -0
- data/spec/api/preview_api_spec.rb +44 -0
- data/spec/api/speech_api_spec.rb +45 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/any_of_chat_completion_request_messages_items_spec.rb +34 -0
- data/spec/models/any_of_chat_completion_request_stop_spec.rb +34 -0
- data/spec/models/any_of_chat_completion_request_tool_choice_spec.rb +34 -0
- data/spec/models/any_of_create_embedding_request_schema_input_spec.rb +34 -0
- data/spec/models/any_of_create_embedding_request_schema_model_spec.rb +34 -0
- data/spec/models/any_of_model_response_model_spec_constraints_spec.rb +34 -0
- data/spec/models/any_of_model_response_model_spec_pricing_spec.rb +34 -0
- data/spec/models/any_of_upscale_image_request_enhance_spec.rb +34 -0
- data/spec/models/any_of_upscale_image_request_image_spec.rb +34 -0
- data/spec/models/any_ofapi_keys_body_expires_at_spec.rb +34 -0
- data/spec/models/any_ofapi_keys_consumption_limit_usd_spec.rb +34 -0
- data/spec/models/any_ofapi_keys_consumption_limit_vcu_spec.rb +34 -0
- data/spec/models/any_ofapi_keys_generate_web3_key_body_expires_at_spec.rb +34 -0
- data/spec/models/any_ofinline_response_200_2_data_items_spec.rb +34 -0
- data/spec/models/any_ofinline_response_200_4_type_spec.rb +34 -0
- data/spec/models/any_ofinline_response_200_5_type_spec.rb +34 -0
- data/spec/models/any_ofinline_response_200_6_type_spec.rb +34 -0
- data/spec/models/any_ofinline_response_200_choices_message_spec.rb +34 -0
- data/spec/models/any_ofinline_response_200_prompt_logprobs_spec.rb +34 -0
- data/spec/models/api_keys_body_spec.rb +61 -0
- data/spec/models/api_keys_consumption_limit_spec.rb +46 -0
- data/spec/models/api_keys_generate_web3_key_body_spec.rb +80 -0
- data/spec/models/billing_usage_request_spec.rb +78 -0
- data/spec/models/billing_usage_response_data_spec.rb +86 -0
- data/spec/models/billing_usage_response_inference_details_spec.rb +57 -0
- data/spec/models/billing_usage_response_pagination_spec.rb +58 -0
- data/spec/models/billing_usage_response_spec.rb +46 -0
- data/spec/models/chat_completion_request_function_spec.rb +52 -0
- data/spec/models/chat_completion_request_spec.rb +189 -0
- data/spec/models/chat_completion_request_stream_options_spec.rb +40 -0
- data/spec/models/chat_completion_request_venice_parameters_spec.rb +73 -0
- data/spec/models/create_embedding_request_schema_spec.rb +68 -0
- data/spec/models/create_speech_request_schema_spec.rb +81 -0
- data/spec/models/generate_image_request_spec.rb +134 -0
- data/spec/models/inline_response_200_10_data_api_tier_spec.rb +45 -0
- data/spec/models/inline_response_200_10_data_balances_spec.rb +45 -0
- data/spec/models/inline_response_200_10_data_rate_limits_1_spec.rb +45 -0
- data/spec/models/inline_response_200_10_data_rate_limits_spec.rb +46 -0
- data/spec/models/inline_response_200_10_data_spec.rb +69 -0
- data/spec/models/inline_response_200_10_spec.rb +40 -0
- data/spec/models/inline_response_200_11_data_spec.rb +64 -0
- data/spec/models/inline_response_200_11_spec.rb +50 -0
- data/spec/models/inline_response_200_12_data_spec.rb +39 -0
- data/spec/models/inline_response_200_12_spec.rb +46 -0
- data/spec/models/inline_response_200_13_data_spec.rb +93 -0
- data/spec/models/inline_response_200_13_spec.rb +49 -0
- data/spec/models/inline_response_200_13_stats_spec.rb +40 -0
- data/spec/models/inline_response_200_14_data_spec.rb +55 -0
- data/spec/models/inline_response_200_14_spec.rb +61 -0
- data/spec/models/inline_response_200_14_usage_spec.rb +45 -0
- data/spec/models/inline_response_200_15_spec.rb +45 -0
- data/spec/models/inline_response_200_1_spec.rb +57 -0
- data/spec/models/inline_response_200_1_timing_spec.rb +58 -0
- data/spec/models/inline_response_200_2_spec.rb +46 -0
- data/spec/models/inline_response_200_3_spec.rb +50 -0
- data/spec/models/inline_response_200_4_spec.rb +55 -0
- data/spec/models/inline_response_200_5_spec.rb +55 -0
- data/spec/models/inline_response_200_6_spec.rb +55 -0
- data/spec/models/inline_response_200_7_data_spec.rb +91 -0
- data/spec/models/inline_response_200_7_spec.rb +50 -0
- data/spec/models/inline_response_200_7_usage_spec.rb +39 -0
- data/spec/models/inline_response_200_7_usage_trailing_seven_days_spec.rb +45 -0
- data/spec/models/inline_response_200_8_data_spec.rb +73 -0
- data/spec/models/inline_response_200_8_spec.rb +45 -0
- data/spec/models/inline_response_200_9_spec.rb +39 -0
- data/spec/models/inline_response_200_choices_spec.rb +72 -0
- data/spec/models/inline_response_200_logprobs_spec.rb +57 -0
- data/spec/models/inline_response_200_logprobs_top_logprobs_spec.rb +51 -0
- data/spec/models/inline_response_200_spec.rb +85 -0
- data/spec/models/inline_response_200_usage_spec.rb +57 -0
- data/spec/models/inline_response_200_venice_parameters_spec.rb +80 -0
- data/spec/models/inline_response_200_venice_parameters_web_search_citations_spec.rb +57 -0
- data/spec/models/inline_response_400_spec.rb +45 -0
- data/spec/models/inline_response_401_spec.rb +39 -0
- data/spec/models/inline_response_402_spec.rb +39 -0
- data/spec/models/inline_response_403_spec.rb +40 -0
- data/spec/models/inline_response_415_spec.rb +40 -0
- data/spec/models/inline_response_429_spec.rb +39 -0
- data/spec/models/inline_response_500_1_spec.rb +40 -0
- data/spec/models/inline_response_500_spec.rb +39 -0
- data/spec/models/inline_response_503_spec.rb +40 -0
- data/spec/models/model_compatibility_schema_spec.rb +34 -0
- data/spec/models/model_response_model_spec_capabilities_spec.rb +85 -0
- data/spec/models/model_response_model_spec_spec.rb +87 -0
- data/spec/models/model_response_spec.rb +81 -0
- data/spec/models/model_trait_schema_spec.rb +34 -0
- data/spec/models/one_of_chat_completion_request_response_format_spec.rb +34 -0
- data/spec/models/simple_generate_image_request_spec.rb +134 -0
- data/spec/models/tool_call_spec.rb +51 -0
- data/spec/models/type_spec.rb +34 -0
- data/spec/models/upscale_image_request_spec.rb +69 -0
- data/spec/spec_helper.rb +110 -0
- data/venice_client.gemspec +38 -0
- metadata +522 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Venice.ai API
|
|
3
|
+
|
|
4
|
+
#The Venice.ai API.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 20250521.233203
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.68
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module VeniceClient
|
|
13
|
+
class BillingApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/billing/usage
|
|
20
|
+
# Get paginated billing usage data for the authenticated user. NOTE: This is a beta endpoint and may be subject to change.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [String] :accept Accept header to specify the response format
|
|
23
|
+
# @option opts [String] :currency
|
|
24
|
+
# @option opts [DateTime] :end_date
|
|
25
|
+
# @option opts [Integer] :limit (default to 200)
|
|
26
|
+
# @option opts [Integer] :page (default to 1)
|
|
27
|
+
# @option opts [String] :sort_order (default to desc)
|
|
28
|
+
# @option opts [DateTime] :start_date
|
|
29
|
+
# @return [InlineResponse20015]
|
|
30
|
+
def get_billing_usage(opts = {})
|
|
31
|
+
data, _status_code, _headers = get_billing_usage_with_http_info(opts)
|
|
32
|
+
data
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# /api/v1/billing/usage
|
|
36
|
+
# Get paginated billing usage data for the authenticated user. NOTE: This is a beta endpoint and may be subject to change.
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [String] :accept Accept header to specify the response format
|
|
39
|
+
# @option opts [String] :currency
|
|
40
|
+
# @option opts [DateTime] :end_date
|
|
41
|
+
# @option opts [Integer] :limit
|
|
42
|
+
# @option opts [Integer] :page
|
|
43
|
+
# @option opts [String] :sort_order
|
|
44
|
+
# @option opts [DateTime] :start_date
|
|
45
|
+
# @return [Array<(InlineResponse20015, Integer, Hash)>] InlineResponse20015 data, response status code and response headers
|
|
46
|
+
def get_billing_usage_with_http_info(opts = {})
|
|
47
|
+
if @api_client.config.debugging
|
|
48
|
+
@api_client.config.logger.debug 'Calling API: BillingApi.get_billing_usage ...'
|
|
49
|
+
end
|
|
50
|
+
if @api_client.config.client_side_validation && opts[:'currency'] && !['USD', 'VCU'].include?(opts[:'currency'])
|
|
51
|
+
fail ArgumentError, 'invalid value for "currency", must be one of USD, VCU'
|
|
52
|
+
end
|
|
53
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
|
|
54
|
+
fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
|
|
55
|
+
end
|
|
56
|
+
# resource path
|
|
57
|
+
local_var_path = '/billing/usage'
|
|
58
|
+
|
|
59
|
+
# query parameters
|
|
60
|
+
query_params = opts[:query_params] || {}
|
|
61
|
+
query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
|
|
62
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
63
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
64
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
65
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
66
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
67
|
+
|
|
68
|
+
# header parameters
|
|
69
|
+
header_params = opts[:header_params] || {}
|
|
70
|
+
# HTTP header 'Accept' (if needed)
|
|
71
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv'])
|
|
72
|
+
header_params[:'Accept'] = opts[:'accept'] if !opts[:'accept'].nil?
|
|
73
|
+
|
|
74
|
+
# form parameters
|
|
75
|
+
form_params = opts[:form_params] || {}
|
|
76
|
+
|
|
77
|
+
# http body (model)
|
|
78
|
+
post_body = opts[:body]
|
|
79
|
+
|
|
80
|
+
return_type = opts[:return_type] || 'InlineResponse20015'
|
|
81
|
+
|
|
82
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
84
|
+
:header_params => header_params,
|
|
85
|
+
:query_params => query_params,
|
|
86
|
+
:form_params => form_params,
|
|
87
|
+
:body => post_body,
|
|
88
|
+
:auth_names => auth_names,
|
|
89
|
+
:return_type => return_type)
|
|
90
|
+
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug "API called: BillingApi#get_billing_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
93
|
+
end
|
|
94
|
+
return data, status_code, headers
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Venice.ai API
|
|
3
|
+
|
|
4
|
+
#The Venice.ai API.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 20250521.233203
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.68
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module VeniceClient
|
|
13
|
+
class CharactersApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/characters
|
|
20
|
+
# This is a preview API and may change. Returns a list of characters supported in the API.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @return [InlineResponse20013]
|
|
23
|
+
def list_characters(opts = {})
|
|
24
|
+
data, _status_code, _headers = list_characters_with_http_info(opts)
|
|
25
|
+
data
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# /api/v1/characters
|
|
29
|
+
# This is a preview API and may change. Returns a list of characters supported in the API.
|
|
30
|
+
# @param [Hash] opts the optional parameters
|
|
31
|
+
# @return [Array<(InlineResponse20013, Integer, Hash)>] InlineResponse20013 data, response status code and response headers
|
|
32
|
+
def list_characters_with_http_info(opts = {})
|
|
33
|
+
if @api_client.config.debugging
|
|
34
|
+
@api_client.config.logger.debug 'Calling API: CharactersApi.list_characters ...'
|
|
35
|
+
end
|
|
36
|
+
# resource path
|
|
37
|
+
local_var_path = '/characters'
|
|
38
|
+
|
|
39
|
+
# query parameters
|
|
40
|
+
query_params = opts[:query_params] || {}
|
|
41
|
+
|
|
42
|
+
# header parameters
|
|
43
|
+
header_params = opts[:header_params] || {}
|
|
44
|
+
# HTTP header 'Accept' (if needed)
|
|
45
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
46
|
+
|
|
47
|
+
# form parameters
|
|
48
|
+
form_params = opts[:form_params] || {}
|
|
49
|
+
|
|
50
|
+
# http body (model)
|
|
51
|
+
post_body = opts[:body]
|
|
52
|
+
|
|
53
|
+
return_type = opts[:return_type] || 'InlineResponse20013'
|
|
54
|
+
|
|
55
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
56
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
57
|
+
:header_params => header_params,
|
|
58
|
+
:query_params => query_params,
|
|
59
|
+
:form_params => form_params,
|
|
60
|
+
:body => post_body,
|
|
61
|
+
:auth_names => auth_names,
|
|
62
|
+
:return_type => return_type)
|
|
63
|
+
|
|
64
|
+
if @api_client.config.debugging
|
|
65
|
+
@api_client.config.logger.debug "API called: CharactersApi#list_characters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
66
|
+
end
|
|
67
|
+
return data, status_code, headers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Venice.ai API
|
|
3
|
+
|
|
4
|
+
#The Venice.ai API.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 20250521.233203
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.68
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module VeniceClient
|
|
13
|
+
class ChatApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/chat/completions
|
|
20
|
+
# Run text inference based on the supplied parameters.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [ChatCompletionRequest] :body
|
|
23
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br). Only applied when stream is false.
|
|
24
|
+
# @return [InlineResponse200]
|
|
25
|
+
def create_chat_completion(opts = {})
|
|
26
|
+
data, _status_code, _headers = create_chat_completion_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# /api/v1/chat/completions
|
|
31
|
+
# Run text inference based on the supplied parameters.
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @option opts [ChatCompletionRequest] :body
|
|
34
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br). Only applied when stream is false.
|
|
35
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
|
36
|
+
def create_chat_completion_with_http_info(opts = {})
|
|
37
|
+
if @api_client.config.debugging
|
|
38
|
+
@api_client.config.logger.debug 'Calling API: ChatApi.create_chat_completion ...'
|
|
39
|
+
end
|
|
40
|
+
# resource path
|
|
41
|
+
local_var_path = '/chat/completions'
|
|
42
|
+
|
|
43
|
+
# query parameters
|
|
44
|
+
query_params = opts[:query_params] || {}
|
|
45
|
+
|
|
46
|
+
# header parameters
|
|
47
|
+
header_params = opts[:header_params] || {}
|
|
48
|
+
# HTTP header 'Accept' (if needed)
|
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
50
|
+
# HTTP header 'Content-Type'
|
|
51
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
52
|
+
header_params[:'Accept-Encoding'] = opts[:'accept_encoding'] if !opts[:'accept_encoding'].nil?
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
59
|
+
|
|
60
|
+
return_type = opts[:return_type] || 'InlineResponse200'
|
|
61
|
+
|
|
62
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
63
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type)
|
|
70
|
+
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: ChatApi#create_chat_completion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Venice.ai API
|
|
3
|
+
|
|
4
|
+
#The Venice.ai API.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 20250521.233203
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.68
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module VeniceClient
|
|
13
|
+
class EmbeddingsApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/embeddings
|
|
20
|
+
# Create embeddings for the supplied input. This is a beta model accessible to Venice beta testers.
|
|
21
|
+
# @param body
|
|
22
|
+
# @param [Hash] opts the optional parameters
|
|
23
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br)
|
|
24
|
+
# @return [InlineResponse20014]
|
|
25
|
+
def create_embedding(body, opts = {})
|
|
26
|
+
data, _status_code, _headers = create_embedding_with_http_info(body, opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# /api/v1/embeddings
|
|
31
|
+
# Create embeddings for the supplied input. This is a beta model accessible to Venice beta testers.
|
|
32
|
+
# @param body
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br)
|
|
35
|
+
# @return [Array<(InlineResponse20014, Integer, Hash)>] InlineResponse20014 data, response status code and response headers
|
|
36
|
+
def create_embedding_with_http_info(body, opts = {})
|
|
37
|
+
if @api_client.config.debugging
|
|
38
|
+
@api_client.config.logger.debug 'Calling API: EmbeddingsApi.create_embedding ...'
|
|
39
|
+
end
|
|
40
|
+
# verify the required parameter 'body' is set
|
|
41
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
42
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling EmbeddingsApi.create_embedding"
|
|
43
|
+
end
|
|
44
|
+
# resource path
|
|
45
|
+
local_var_path = '/embeddings'
|
|
46
|
+
|
|
47
|
+
# query parameters
|
|
48
|
+
query_params = opts[:query_params] || {}
|
|
49
|
+
|
|
50
|
+
# header parameters
|
|
51
|
+
header_params = opts[:header_params] || {}
|
|
52
|
+
# HTTP header 'Accept' (if needed)
|
|
53
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
54
|
+
# HTTP header 'Content-Type'
|
|
55
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
56
|
+
header_params[:'Accept-Encoding'] = opts[:'accept_encoding'] if !opts[:'accept_encoding'].nil?
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = opts[:form_params] || {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
63
|
+
|
|
64
|
+
return_type = opts[:return_type] || 'InlineResponse20014'
|
|
65
|
+
|
|
66
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
67
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type)
|
|
74
|
+
|
|
75
|
+
if @api_client.config.debugging
|
|
76
|
+
@api_client.config.logger.debug "API called: EmbeddingsApi#create_embedding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
77
|
+
end
|
|
78
|
+
return data, status_code, headers
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Venice.ai API
|
|
3
|
+
|
|
4
|
+
#The Venice.ai API.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 20250521.233203
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.68
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module VeniceClient
|
|
13
|
+
class ImageApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/image/generate
|
|
20
|
+
# Generate an image based on input parameters
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [GenerateImageRequest] :body
|
|
23
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br). Only applied when return_binary is false.
|
|
24
|
+
# @return [InlineResponse2001]
|
|
25
|
+
def generate_image(opts = {})
|
|
26
|
+
data, _status_code, _headers = generate_image_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# /api/v1/image/generate
|
|
31
|
+
# Generate an image based on input parameters
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @option opts [GenerateImageRequest] :body
|
|
34
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br). Only applied when return_binary is false.
|
|
35
|
+
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
|
36
|
+
def generate_image_with_http_info(opts = {})
|
|
37
|
+
if @api_client.config.debugging
|
|
38
|
+
@api_client.config.logger.debug 'Calling API: ImageApi.generate_image ...'
|
|
39
|
+
end
|
|
40
|
+
# resource path
|
|
41
|
+
local_var_path = '/image/generate'
|
|
42
|
+
|
|
43
|
+
# query parameters
|
|
44
|
+
query_params = opts[:query_params] || {}
|
|
45
|
+
|
|
46
|
+
# header parameters
|
|
47
|
+
header_params = opts[:header_params] || {}
|
|
48
|
+
# HTTP header 'Accept' (if needed)
|
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'image/jpeg', 'image/png', 'image/webp'])
|
|
50
|
+
# HTTP header 'Content-Type'
|
|
51
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
52
|
+
header_params[:'Accept-Encoding'] = opts[:'accept_encoding'] if !opts[:'accept_encoding'].nil?
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
59
|
+
|
|
60
|
+
return_type = opts[:return_type] || 'InlineResponse2001'
|
|
61
|
+
|
|
62
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
63
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type)
|
|
70
|
+
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: ImageApi#generate_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
# /api/v1/image/styles
|
|
77
|
+
# List available image styles that can be used with the generate API.
|
|
78
|
+
# @param [Hash] opts the optional parameters
|
|
79
|
+
# @return [InlineResponse2003]
|
|
80
|
+
def image_styles_get(opts = {})
|
|
81
|
+
data, _status_code, _headers = image_styles_get_with_http_info(opts)
|
|
82
|
+
data
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# /api/v1/image/styles
|
|
86
|
+
# List available image styles that can be used with the generate API.
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
|
|
89
|
+
def image_styles_get_with_http_info(opts = {})
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug 'Calling API: ImageApi.image_styles_get ...'
|
|
92
|
+
end
|
|
93
|
+
# resource path
|
|
94
|
+
local_var_path = '/image/styles'
|
|
95
|
+
|
|
96
|
+
# query parameters
|
|
97
|
+
query_params = opts[:query_params] || {}
|
|
98
|
+
|
|
99
|
+
# header parameters
|
|
100
|
+
header_params = opts[:header_params] || {}
|
|
101
|
+
# HTTP header 'Accept' (if needed)
|
|
102
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
103
|
+
|
|
104
|
+
# form parameters
|
|
105
|
+
form_params = opts[:form_params] || {}
|
|
106
|
+
|
|
107
|
+
# http body (model)
|
|
108
|
+
post_body = opts[:body]
|
|
109
|
+
|
|
110
|
+
return_type = opts[:return_type] || 'InlineResponse2003'
|
|
111
|
+
|
|
112
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
113
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
114
|
+
:header_params => header_params,
|
|
115
|
+
:query_params => query_params,
|
|
116
|
+
:form_params => form_params,
|
|
117
|
+
:body => post_body,
|
|
118
|
+
:auth_names => auth_names,
|
|
119
|
+
:return_type => return_type)
|
|
120
|
+
|
|
121
|
+
if @api_client.config.debugging
|
|
122
|
+
@api_client.config.logger.debug "API called: ImageApi#image_styles_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
123
|
+
end
|
|
124
|
+
return data, status_code, headers
|
|
125
|
+
end
|
|
126
|
+
# /api/v1/image/generations
|
|
127
|
+
# Generate an image based on input parameters using an OpenAI compatible endpoint. This endpoint does not support the full feature set of the Venice Image Generation endpoint, but is compatible with the existing OpenAI endpoint.
|
|
128
|
+
# @param [Hash] opts the optional parameters
|
|
129
|
+
# @option opts [SimpleGenerateImageRequest] :body
|
|
130
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br).
|
|
131
|
+
# @return [InlineResponse2002]
|
|
132
|
+
def simple_generate_image(opts = {})
|
|
133
|
+
data, _status_code, _headers = simple_generate_image_with_http_info(opts)
|
|
134
|
+
data
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# /api/v1/image/generations
|
|
138
|
+
# Generate an image based on input parameters using an OpenAI compatible endpoint. This endpoint does not support the full feature set of the Venice Image Generation endpoint, but is compatible with the existing OpenAI endpoint.
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @option opts [SimpleGenerateImageRequest] :body
|
|
141
|
+
# @option opts [String] :accept_encoding Supported compression encodings (gzip, br).
|
|
142
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
|
143
|
+
def simple_generate_image_with_http_info(opts = {})
|
|
144
|
+
if @api_client.config.debugging
|
|
145
|
+
@api_client.config.logger.debug 'Calling API: ImageApi.simple_generate_image ...'
|
|
146
|
+
end
|
|
147
|
+
# resource path
|
|
148
|
+
local_var_path = '/images/generations'
|
|
149
|
+
|
|
150
|
+
# query parameters
|
|
151
|
+
query_params = opts[:query_params] || {}
|
|
152
|
+
|
|
153
|
+
# header parameters
|
|
154
|
+
header_params = opts[:header_params] || {}
|
|
155
|
+
# HTTP header 'Accept' (if needed)
|
|
156
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
157
|
+
# HTTP header 'Content-Type'
|
|
158
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
159
|
+
header_params[:'Accept-Encoding'] = opts[:'accept_encoding'] if !opts[:'accept_encoding'].nil?
|
|
160
|
+
|
|
161
|
+
# form parameters
|
|
162
|
+
form_params = opts[:form_params] || {}
|
|
163
|
+
|
|
164
|
+
# http body (model)
|
|
165
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
166
|
+
|
|
167
|
+
return_type = opts[:return_type] || 'InlineResponse2002'
|
|
168
|
+
|
|
169
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
170
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
171
|
+
:header_params => header_params,
|
|
172
|
+
:query_params => query_params,
|
|
173
|
+
:form_params => form_params,
|
|
174
|
+
:body => post_body,
|
|
175
|
+
:auth_names => auth_names,
|
|
176
|
+
:return_type => return_type)
|
|
177
|
+
|
|
178
|
+
if @api_client.config.debugging
|
|
179
|
+
@api_client.config.logger.debug "API called: ImageApi#simple_generate_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
180
|
+
end
|
|
181
|
+
return data, status_code, headers
|
|
182
|
+
end
|
|
183
|
+
# /api/v1/image/upscale
|
|
184
|
+
# Upscale or enhance an image based on the supplied parameters. Using a scale of 1 with enhance enabled will only run the enhancer. The image can be provided either as a multipart form-data file upload or as a base64-encoded string in a JSON request.
|
|
185
|
+
# @param [Hash] opts the optional parameters
|
|
186
|
+
# @option opts [UpscaleImageRequest] :body
|
|
187
|
+
# @return [String]
|
|
188
|
+
def upscale_image(opts = {})
|
|
189
|
+
data, _status_code, _headers = upscale_image_with_http_info(opts)
|
|
190
|
+
data
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# /api/v1/image/upscale
|
|
194
|
+
# Upscale or enhance an image based on the supplied parameters. Using a scale of 1 with enhance enabled will only run the enhancer. The image can be provided either as a multipart form-data file upload or as a base64-encoded string in a JSON request.
|
|
195
|
+
# @param [Hash] opts the optional parameters
|
|
196
|
+
# @option opts [UpscaleImageRequest] :body
|
|
197
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
198
|
+
def upscale_image_with_http_info(opts = {})
|
|
199
|
+
if @api_client.config.debugging
|
|
200
|
+
@api_client.config.logger.debug 'Calling API: ImageApi.upscale_image ...'
|
|
201
|
+
end
|
|
202
|
+
# resource path
|
|
203
|
+
local_var_path = '/image/upscale'
|
|
204
|
+
|
|
205
|
+
# query parameters
|
|
206
|
+
query_params = opts[:query_params] || {}
|
|
207
|
+
|
|
208
|
+
# header parameters
|
|
209
|
+
header_params = opts[:header_params] || {}
|
|
210
|
+
# HTTP header 'Accept' (if needed)
|
|
211
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/png', 'application/json'])
|
|
212
|
+
# HTTP header 'Content-Type'
|
|
213
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
214
|
+
|
|
215
|
+
# form parameters
|
|
216
|
+
form_params = opts[:form_params] || {}
|
|
217
|
+
form_params['enhance'] = opts[:'enhance'] if !opts[:'enhance'].nil?
|
|
218
|
+
form_params['enhanceCreativity'] = opts[:'enhance_creativity'] if !opts[:'enhance_creativity'].nil?
|
|
219
|
+
form_params['enhancePrompt'] = opts[:'enhance_prompt'] if !opts[:'enhance_prompt'].nil?
|
|
220
|
+
form_params['image'] = opts[:'image'] if !opts[:'image'].nil?
|
|
221
|
+
form_params['replication'] = opts[:'replication'] if !opts[:'replication'].nil?
|
|
222
|
+
form_params['scale'] = opts[:'scale'] if !opts[:'scale'].nil?
|
|
223
|
+
|
|
224
|
+
# http body (model)
|
|
225
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
226
|
+
|
|
227
|
+
return_type = opts[:return_type] || 'String'
|
|
228
|
+
|
|
229
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
230
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
231
|
+
:header_params => header_params,
|
|
232
|
+
:query_params => query_params,
|
|
233
|
+
:form_params => form_params,
|
|
234
|
+
:body => post_body,
|
|
235
|
+
:auth_names => auth_names,
|
|
236
|
+
:return_type => return_type)
|
|
237
|
+
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug "API called: ImageApi#upscale_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
240
|
+
end
|
|
241
|
+
return data, status_code, headers
|
|
242
|
+
end
|
|
243
|
+
# /api/v1/image/upscale
|
|
244
|
+
# Upscale or enhance an image based on the supplied parameters. Using a scale of 1 with enhance enabled will only run the enhancer. The image can be provided either as a multipart form-data file upload or as a base64-encoded string in a JSON request.
|
|
245
|
+
# @param [Hash] opts the optional parameters
|
|
246
|
+
# @option opts [] :enhance
|
|
247
|
+
# @option opts [BigDecimal] :enhance_creativity
|
|
248
|
+
# @option opts [String] :enhance_prompt
|
|
249
|
+
# @option opts [] :image
|
|
250
|
+
# @option opts [BigDecimal] :replication
|
|
251
|
+
# @option opts [BigDecimal] :scale
|
|
252
|
+
# @return [String]
|
|
253
|
+
def upscale_image(opts = {})
|
|
254
|
+
data, _status_code, _headers = upscale_image_with_http_info(opts)
|
|
255
|
+
data
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# /api/v1/image/upscale
|
|
259
|
+
# Upscale or enhance an image based on the supplied parameters. Using a scale of 1 with enhance enabled will only run the enhancer. The image can be provided either as a multipart form-data file upload or as a base64-encoded string in a JSON request.
|
|
260
|
+
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @option opts [] :enhance
|
|
262
|
+
# @option opts [BigDecimal] :enhance_creativity
|
|
263
|
+
# @option opts [String] :enhance_prompt
|
|
264
|
+
# @option opts [] :image
|
|
265
|
+
# @option opts [BigDecimal] :replication
|
|
266
|
+
# @option opts [BigDecimal] :scale
|
|
267
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
268
|
+
def upscale_image_with_http_info(opts = {})
|
|
269
|
+
if @api_client.config.debugging
|
|
270
|
+
@api_client.config.logger.debug 'Calling API: ImageApi.upscale_image ...'
|
|
271
|
+
end
|
|
272
|
+
# resource path
|
|
273
|
+
local_var_path = '/image/upscale'
|
|
274
|
+
|
|
275
|
+
# query parameters
|
|
276
|
+
query_params = opts[:query_params] || {}
|
|
277
|
+
|
|
278
|
+
# header parameters
|
|
279
|
+
header_params = opts[:header_params] || {}
|
|
280
|
+
# HTTP header 'Accept' (if needed)
|
|
281
|
+
header_params['Accept'] = @api_client.select_header_accept(['image/png', 'application/json'])
|
|
282
|
+
# HTTP header 'Content-Type'
|
|
283
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
284
|
+
|
|
285
|
+
# form parameters
|
|
286
|
+
form_params = opts[:form_params] || {}
|
|
287
|
+
form_params['enhance'] = opts[:'enhance'] if !opts[:'enhance'].nil?
|
|
288
|
+
form_params['enhanceCreativity'] = opts[:'enhance_creativity'] if !opts[:'enhance_creativity'].nil?
|
|
289
|
+
form_params['enhancePrompt'] = opts[:'enhance_prompt'] if !opts[:'enhance_prompt'].nil?
|
|
290
|
+
form_params['image'] = opts[:'image'] if !opts[:'image'].nil?
|
|
291
|
+
form_params['replication'] = opts[:'replication'] if !opts[:'replication'].nil?
|
|
292
|
+
form_params['scale'] = opts[:'scale'] if !opts[:'scale'].nil?
|
|
293
|
+
|
|
294
|
+
# http body (model)
|
|
295
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
296
|
+
|
|
297
|
+
return_type = opts[:return_type] || 'String'
|
|
298
|
+
|
|
299
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
300
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
301
|
+
:header_params => header_params,
|
|
302
|
+
:query_params => query_params,
|
|
303
|
+
:form_params => form_params,
|
|
304
|
+
:body => post_body,
|
|
305
|
+
:auth_names => auth_names,
|
|
306
|
+
:return_type => return_type)
|
|
307
|
+
|
|
308
|
+
if @api_client.config.debugging
|
|
309
|
+
@api_client.config.logger.debug "API called: ImageApi#upscale_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
310
|
+
end
|
|
311
|
+
return data, status_code, headers
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
end
|