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
data/docs/PreviewApi.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# VeniceClient::PreviewApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.venice.ai/api/v1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**list_characters**](PreviewApi.md#list_characters) | **GET** /characters | /api/v1/characters
|
|
8
|
+
|
|
9
|
+
# **list_characters**
|
|
10
|
+
> InlineResponse20013 list_characters
|
|
11
|
+
|
|
12
|
+
/api/v1/characters
|
|
13
|
+
|
|
14
|
+
This is a preview API and may change. Returns a list of characters supported in the API.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
```ruby
|
|
18
|
+
# load the gem
|
|
19
|
+
require 'venice_client'
|
|
20
|
+
# setup authorization
|
|
21
|
+
VeniceClient.configure do |config|
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
api_instance = VeniceClient::PreviewApi.new
|
|
25
|
+
|
|
26
|
+
begin
|
|
27
|
+
#/api/v1/characters
|
|
28
|
+
result = api_instance.list_characters
|
|
29
|
+
p result
|
|
30
|
+
rescue VeniceClient::ApiError => e
|
|
31
|
+
puts "Exception when calling PreviewApi->list_characters: #{e}"
|
|
32
|
+
end
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
This endpoint does not need any parameter.
|
|
37
|
+
|
|
38
|
+
### Return type
|
|
39
|
+
|
|
40
|
+
[**InlineResponse20013**](InlineResponse20013.md)
|
|
41
|
+
|
|
42
|
+
### Authorization
|
|
43
|
+
|
|
44
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
45
|
+
|
|
46
|
+
### HTTP request headers
|
|
47
|
+
|
|
48
|
+
- **Content-Type**: Not defined
|
|
49
|
+
- **Accept**: application/json
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# VeniceClient::SimpleGenerateImageRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**background** | **String** | This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API | [optional] [default to 'auto']
|
|
7
|
+
**model** | **String** | The model to use for image generation. Defaults to Venice's default image model. If a non-existent model is specified (ie an OpenAI model name), it will default to Venice's default image model. | [optional] [default to 'default']
|
|
8
|
+
**moderation** | **String** | auto enables safe venice mode which will blur out adult content. low disables safe venice mode. | [optional] [default to 'auto']
|
|
9
|
+
**n** | **Integer** | Number of images to generate. Venice presently only supports 1 image per request. | [optional] [default to 1]
|
|
10
|
+
**output_compression** | **Integer** | This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API | [optional] [default to 100]
|
|
11
|
+
**output_format** | **String** | Output format for generated images | [optional] [default to 'png']
|
|
12
|
+
**prompt** | **String** | A text description of the desired image. |
|
|
13
|
+
**quality** | **String** | This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API | [optional] [default to 'auto']
|
|
14
|
+
**response_format** | **String** | Response format. URL will be a data URL. | [optional] [default to 'b64_json']
|
|
15
|
+
**size** | **String** | Size of generated images. Default is 1024x1024 | [optional] [default to 'auto']
|
|
16
|
+
**style** | **String** | This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API | [optional] [default to 'natural']
|
|
17
|
+
**user** | **String** | This parameter is not used in Venice image generation but is supported for compatibility with OpenAI API | [optional]
|
|
18
|
+
|
data/docs/SpeechApi.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# VeniceClient::SpeechApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.venice.ai/api/v1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**create_speech**](SpeechApi.md#create_speech) | **POST** /audio/speech | /api/v1/audio/speech
|
|
8
|
+
|
|
9
|
+
# **create_speech**
|
|
10
|
+
> String create_speech(opts)
|
|
11
|
+
|
|
12
|
+
/api/v1/audio/speech
|
|
13
|
+
|
|
14
|
+
Converts text to speech using various voice models and formats.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
```ruby
|
|
18
|
+
# load the gem
|
|
19
|
+
require 'venice_client'
|
|
20
|
+
# setup authorization
|
|
21
|
+
VeniceClient.configure do |config|
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
api_instance = VeniceClient::SpeechApi.new
|
|
25
|
+
opts = {
|
|
26
|
+
body: VeniceClient::CreateSpeechRequestSchema.new # CreateSpeechRequestSchema |
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
begin
|
|
30
|
+
#/api/v1/audio/speech
|
|
31
|
+
result = api_instance.create_speech(opts)
|
|
32
|
+
p result
|
|
33
|
+
rescue VeniceClient::ApiError => e
|
|
34
|
+
puts "Exception when calling SpeechApi->create_speech: #{e}"
|
|
35
|
+
end
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Parameters
|
|
39
|
+
|
|
40
|
+
Name | Type | Description | Notes
|
|
41
|
+
------------- | ------------- | ------------- | -------------
|
|
42
|
+
**body** | [**CreateSpeechRequestSchema**](CreateSpeechRequestSchema.md)| | [optional]
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**String**
|
|
47
|
+
|
|
48
|
+
### Authorization
|
|
49
|
+
|
|
50
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
51
|
+
|
|
52
|
+
### HTTP request headers
|
|
53
|
+
|
|
54
|
+
- **Content-Type**: application/json
|
|
55
|
+
- **Accept**: audio/aac, audio/flac, audio/mpeg, audio/opus, audio/pcm, audio/wav, application/json
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
data/docs/ToolCall.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# VeniceClient::ToolCall
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**function** | [**ChatCompletionRequestFunction**](ChatCompletionRequestFunction.md) | |
|
|
7
|
+
**id** | **String** | | [optional]
|
|
8
|
+
**type** | **String** | | [optional]
|
|
9
|
+
|
data/docs/Type.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# VeniceClient::UpscaleImageRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**enhance** | [**AnyOfUpscaleImageRequestEnhance**](AnyOfUpscaleImageRequestEnhance.md) | Whether to enhance the image using Venice's image engine during upscaling. Must be true if scale is 1. | [optional]
|
|
7
|
+
**enhance_creativity** | [**BigDecimal**](BigDecimal.md) | Higher values let the enhancement AI change the image more. Setting this to 1 effectively creates an entirely new image. | [optional] [default to 0.5]
|
|
8
|
+
**enhance_prompt** | **String** | The text to image style to apply during prompt enhancement. Does best with short descriptive prompts, like gold, marble or angry, menacing. | [optional]
|
|
9
|
+
**image** | [**AnyOfUpscaleImageRequestImage**](AnyOfUpscaleImageRequestImage.md) | The image to upscale. Can be either a file upload or a base64-encoded string. Image dimensions must be at least 65536 pixels and final dimensions after scaling must not exceed 16777216 pixels |
|
|
10
|
+
**replication** | [**BigDecimal**](BigDecimal.md) | How strongly lines and noise in the base image are preserved. Higher values are noisier but less plastic/AI \"generated\"/hallucinated. Must be between 0.1 and 1. | [optional] [default to 0.35]
|
|
11
|
+
**scale** | [**BigDecimal**](BigDecimal.md) | The scale factor for upscaling the image. Must be a number between 1 and 4. Scale of 1 requires enhance to be set true and will only run the enhancer. Scale must be > 1 if enhance is false. A scale of 4 with large images will result in the scale being dynamically set to ensure the final image stays within the maximum size limits. | [optional] [default to 2]
|
|
12
|
+
|
data/git_push.sh
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
4
|
+
#
|
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
6
|
+
#
|
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
|
8
|
+
|
|
9
|
+
git_user_id=$1
|
|
10
|
+
git_repo_id=$2
|
|
11
|
+
release_note=$3
|
|
12
|
+
|
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
|
14
|
+
git_user_id="GIT_USER_ID"
|
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if [ "$release_note" = "" ]; then
|
|
24
|
+
release_note="Minor update"
|
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Initialize the local directory as a Git repository
|
|
29
|
+
git init
|
|
30
|
+
|
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
|
32
|
+
git add .
|
|
33
|
+
|
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
35
|
+
git commit -m "$release_note"
|
|
36
|
+
|
|
37
|
+
# Sets the new remote
|
|
38
|
+
git_remote=`git remote`
|
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
40
|
+
|
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
|
44
|
+
else
|
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
git pull origin master
|
|
51
|
+
|
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
|
55
|
+
|
|
@@ -0,0 +1,381 @@
|
|
|
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 APIKeysApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/api_keys
|
|
20
|
+
# Create a new API key.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [ApiKeysBody] :body
|
|
23
|
+
# @return [InlineResponse2008]
|
|
24
|
+
def create_api_key(opts = {})
|
|
25
|
+
data, _status_code, _headers = create_api_key_with_http_info(opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# /api/v1/api_keys
|
|
30
|
+
# Create a new API key.
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @option opts [ApiKeysBody] :body
|
|
33
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
|
34
|
+
def create_api_key_with_http_info(opts = {})
|
|
35
|
+
if @api_client.config.debugging
|
|
36
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.create_api_key ...'
|
|
37
|
+
end
|
|
38
|
+
# resource path
|
|
39
|
+
local_var_path = '/api_keys'
|
|
40
|
+
|
|
41
|
+
# query parameters
|
|
42
|
+
query_params = opts[:query_params] || {}
|
|
43
|
+
|
|
44
|
+
# header parameters
|
|
45
|
+
header_params = opts[:header_params] || {}
|
|
46
|
+
# HTTP header 'Accept' (if needed)
|
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
48
|
+
# HTTP header 'Content-Type'
|
|
49
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
56
|
+
|
|
57
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
|
58
|
+
|
|
59
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
60
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => return_type)
|
|
67
|
+
|
|
68
|
+
if @api_client.config.debugging
|
|
69
|
+
@api_client.config.logger.debug "API called: APIKeysApi#create_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
70
|
+
end
|
|
71
|
+
return data, status_code, headers
|
|
72
|
+
end
|
|
73
|
+
# /api/v1/api_keys
|
|
74
|
+
# Delete an API key.
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @option opts [String] :id The ID of the API key to delete
|
|
77
|
+
# @return [InlineResponse2009]
|
|
78
|
+
def delete_api_key(opts = {})
|
|
79
|
+
data, _status_code, _headers = delete_api_key_with_http_info(opts)
|
|
80
|
+
data
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# /api/v1/api_keys
|
|
84
|
+
# Delete an API key.
|
|
85
|
+
# @param [Hash] opts the optional parameters
|
|
86
|
+
# @option opts [String] :id The ID of the API key to delete
|
|
87
|
+
# @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
|
|
88
|
+
def delete_api_key_with_http_info(opts = {})
|
|
89
|
+
if @api_client.config.debugging
|
|
90
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.delete_api_key ...'
|
|
91
|
+
end
|
|
92
|
+
# resource path
|
|
93
|
+
local_var_path = '/api_keys'
|
|
94
|
+
|
|
95
|
+
# query parameters
|
|
96
|
+
query_params = opts[:query_params] || {}
|
|
97
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
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] || 'InlineResponse2009'
|
|
111
|
+
|
|
112
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
113
|
+
data, status_code, headers = @api_client.call_api(:DELETE, 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: APIKeysApi#delete_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
123
|
+
end
|
|
124
|
+
return data, status_code, headers
|
|
125
|
+
end
|
|
126
|
+
# /api/v1/api_keys/generate_web3_key
|
|
127
|
+
# Returns the token required to generate an API key via a wallet.
|
|
128
|
+
# @param [Hash] opts the optional parameters
|
|
129
|
+
# @return [InlineResponse20012]
|
|
130
|
+
def get_api_key_generate_web3_key(opts = {})
|
|
131
|
+
data, _status_code, _headers = get_api_key_generate_web3_key_with_http_info(opts)
|
|
132
|
+
data
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# /api/v1/api_keys/generate_web3_key
|
|
136
|
+
# Returns the token required to generate an API key via a wallet.
|
|
137
|
+
# @param [Hash] opts the optional parameters
|
|
138
|
+
# @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers
|
|
139
|
+
def get_api_key_generate_web3_key_with_http_info(opts = {})
|
|
140
|
+
if @api_client.config.debugging
|
|
141
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.get_api_key_generate_web3_key ...'
|
|
142
|
+
end
|
|
143
|
+
# resource path
|
|
144
|
+
local_var_path = '/api_keys/generate_web3_key'
|
|
145
|
+
|
|
146
|
+
# query parameters
|
|
147
|
+
query_params = opts[:query_params] || {}
|
|
148
|
+
|
|
149
|
+
# header parameters
|
|
150
|
+
header_params = opts[:header_params] || {}
|
|
151
|
+
# HTTP header 'Accept' (if needed)
|
|
152
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
153
|
+
|
|
154
|
+
# form parameters
|
|
155
|
+
form_params = opts[:form_params] || {}
|
|
156
|
+
|
|
157
|
+
# http body (model)
|
|
158
|
+
post_body = opts[:body]
|
|
159
|
+
|
|
160
|
+
return_type = opts[:return_type] || 'InlineResponse20012'
|
|
161
|
+
|
|
162
|
+
auth_names = opts[:auth_names] || []
|
|
163
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
164
|
+
:header_params => header_params,
|
|
165
|
+
:query_params => query_params,
|
|
166
|
+
:form_params => form_params,
|
|
167
|
+
:body => post_body,
|
|
168
|
+
:auth_names => auth_names,
|
|
169
|
+
:return_type => return_type)
|
|
170
|
+
|
|
171
|
+
if @api_client.config.debugging
|
|
172
|
+
@api_client.config.logger.debug "API called: APIKeysApi#get_api_key_generate_web3_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
173
|
+
end
|
|
174
|
+
return data, status_code, headers
|
|
175
|
+
end
|
|
176
|
+
# /api/v1/api_keys/rate_limits/log
|
|
177
|
+
# Returns the last 50 rate limits that the account exceeded.
|
|
178
|
+
# @param [Hash] opts the optional parameters
|
|
179
|
+
# @return [InlineResponse20011]
|
|
180
|
+
def get_api_key_rate_limit_logs(opts = {})
|
|
181
|
+
data, _status_code, _headers = get_api_key_rate_limit_logs_with_http_info(opts)
|
|
182
|
+
data
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# /api/v1/api_keys/rate_limits/log
|
|
186
|
+
# Returns the last 50 rate limits that the account exceeded.
|
|
187
|
+
# @param [Hash] opts the optional parameters
|
|
188
|
+
# @return [Array<(InlineResponse20011, Integer, Hash)>] InlineResponse20011 data, response status code and response headers
|
|
189
|
+
def get_api_key_rate_limit_logs_with_http_info(opts = {})
|
|
190
|
+
if @api_client.config.debugging
|
|
191
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.get_api_key_rate_limit_logs ...'
|
|
192
|
+
end
|
|
193
|
+
# resource path
|
|
194
|
+
local_var_path = '/api_keys/rate_limits/log'
|
|
195
|
+
|
|
196
|
+
# query parameters
|
|
197
|
+
query_params = opts[:query_params] || {}
|
|
198
|
+
|
|
199
|
+
# header parameters
|
|
200
|
+
header_params = opts[:header_params] || {}
|
|
201
|
+
# HTTP header 'Accept' (if needed)
|
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
203
|
+
|
|
204
|
+
# form parameters
|
|
205
|
+
form_params = opts[:form_params] || {}
|
|
206
|
+
|
|
207
|
+
# http body (model)
|
|
208
|
+
post_body = opts[:body]
|
|
209
|
+
|
|
210
|
+
return_type = opts[:return_type] || 'InlineResponse20011'
|
|
211
|
+
|
|
212
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
213
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
214
|
+
:header_params => header_params,
|
|
215
|
+
:query_params => query_params,
|
|
216
|
+
:form_params => form_params,
|
|
217
|
+
:body => post_body,
|
|
218
|
+
:auth_names => auth_names,
|
|
219
|
+
:return_type => return_type)
|
|
220
|
+
|
|
221
|
+
if @api_client.config.debugging
|
|
222
|
+
@api_client.config.logger.debug "API called: APIKeysApi#get_api_key_rate_limit_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
223
|
+
end
|
|
224
|
+
return data, status_code, headers
|
|
225
|
+
end
|
|
226
|
+
# /api/v1/api_keys/rate_limits
|
|
227
|
+
# Return details about user balances and rate limits.
|
|
228
|
+
# @param [Hash] opts the optional parameters
|
|
229
|
+
# @return [InlineResponse20010]
|
|
230
|
+
def get_api_key_rate_limits(opts = {})
|
|
231
|
+
data, _status_code, _headers = get_api_key_rate_limits_with_http_info(opts)
|
|
232
|
+
data
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# /api/v1/api_keys/rate_limits
|
|
236
|
+
# Return details about user balances and rate limits.
|
|
237
|
+
# @param [Hash] opts the optional parameters
|
|
238
|
+
# @return [Array<(InlineResponse20010, Integer, Hash)>] InlineResponse20010 data, response status code and response headers
|
|
239
|
+
def get_api_key_rate_limits_with_http_info(opts = {})
|
|
240
|
+
if @api_client.config.debugging
|
|
241
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.get_api_key_rate_limits ...'
|
|
242
|
+
end
|
|
243
|
+
# resource path
|
|
244
|
+
local_var_path = '/api_keys/rate_limits'
|
|
245
|
+
|
|
246
|
+
# query parameters
|
|
247
|
+
query_params = opts[:query_params] || {}
|
|
248
|
+
|
|
249
|
+
# header parameters
|
|
250
|
+
header_params = opts[:header_params] || {}
|
|
251
|
+
# HTTP header 'Accept' (if needed)
|
|
252
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
253
|
+
|
|
254
|
+
# form parameters
|
|
255
|
+
form_params = opts[:form_params] || {}
|
|
256
|
+
|
|
257
|
+
# http body (model)
|
|
258
|
+
post_body = opts[:body]
|
|
259
|
+
|
|
260
|
+
return_type = opts[:return_type] || 'InlineResponse20010'
|
|
261
|
+
|
|
262
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
263
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
264
|
+
:header_params => header_params,
|
|
265
|
+
:query_params => query_params,
|
|
266
|
+
:form_params => form_params,
|
|
267
|
+
:body => post_body,
|
|
268
|
+
:auth_names => auth_names,
|
|
269
|
+
:return_type => return_type)
|
|
270
|
+
|
|
271
|
+
if @api_client.config.debugging
|
|
272
|
+
@api_client.config.logger.debug "API called: APIKeysApi#get_api_key_rate_limits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
273
|
+
end
|
|
274
|
+
return data, status_code, headers
|
|
275
|
+
end
|
|
276
|
+
# /api/v1/api_keys
|
|
277
|
+
# Return a list of API keys.
|
|
278
|
+
# @param [Hash] opts the optional parameters
|
|
279
|
+
# @return [InlineResponse2007]
|
|
280
|
+
def get_api_keys(opts = {})
|
|
281
|
+
data, _status_code, _headers = get_api_keys_with_http_info(opts)
|
|
282
|
+
data
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# /api/v1/api_keys
|
|
286
|
+
# Return a list of API keys.
|
|
287
|
+
# @param [Hash] opts the optional parameters
|
|
288
|
+
# @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
|
|
289
|
+
def get_api_keys_with_http_info(opts = {})
|
|
290
|
+
if @api_client.config.debugging
|
|
291
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.get_api_keys ...'
|
|
292
|
+
end
|
|
293
|
+
# resource path
|
|
294
|
+
local_var_path = '/api_keys'
|
|
295
|
+
|
|
296
|
+
# query parameters
|
|
297
|
+
query_params = opts[:query_params] || {}
|
|
298
|
+
|
|
299
|
+
# header parameters
|
|
300
|
+
header_params = opts[:header_params] || {}
|
|
301
|
+
# HTTP header 'Accept' (if needed)
|
|
302
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
303
|
+
|
|
304
|
+
# form parameters
|
|
305
|
+
form_params = opts[:form_params] || {}
|
|
306
|
+
|
|
307
|
+
# http body (model)
|
|
308
|
+
post_body = opts[:body]
|
|
309
|
+
|
|
310
|
+
return_type = opts[:return_type] || 'InlineResponse2007'
|
|
311
|
+
|
|
312
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
313
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
314
|
+
:header_params => header_params,
|
|
315
|
+
:query_params => query_params,
|
|
316
|
+
:form_params => form_params,
|
|
317
|
+
:body => post_body,
|
|
318
|
+
:auth_names => auth_names,
|
|
319
|
+
:return_type => return_type)
|
|
320
|
+
|
|
321
|
+
if @api_client.config.debugging
|
|
322
|
+
@api_client.config.logger.debug "API called: APIKeysApi#get_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
323
|
+
end
|
|
324
|
+
return data, status_code, headers
|
|
325
|
+
end
|
|
326
|
+
# /api/v1/api_keys/generate_web3_key
|
|
327
|
+
# Authenticates a wallet holding sVVV and creates an API key.
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @option opts [ApiKeysGenerateWeb3KeyBody] :body
|
|
330
|
+
# @return [InlineResponse2008]
|
|
331
|
+
def post_api_key_generate_web3_key(opts = {})
|
|
332
|
+
data, _status_code, _headers = post_api_key_generate_web3_key_with_http_info(opts)
|
|
333
|
+
data
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# /api/v1/api_keys/generate_web3_key
|
|
337
|
+
# Authenticates a wallet holding sVVV and creates an API key.
|
|
338
|
+
# @param [Hash] opts the optional parameters
|
|
339
|
+
# @option opts [ApiKeysGenerateWeb3KeyBody] :body
|
|
340
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
|
341
|
+
def post_api_key_generate_web3_key_with_http_info(opts = {})
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.post_api_key_generate_web3_key ...'
|
|
344
|
+
end
|
|
345
|
+
# resource path
|
|
346
|
+
local_var_path = '/api_keys/generate_web3_key'
|
|
347
|
+
|
|
348
|
+
# query parameters
|
|
349
|
+
query_params = opts[:query_params] || {}
|
|
350
|
+
|
|
351
|
+
# header parameters
|
|
352
|
+
header_params = opts[:header_params] || {}
|
|
353
|
+
# HTTP header 'Accept' (if needed)
|
|
354
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
355
|
+
# HTTP header 'Content-Type'
|
|
356
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
357
|
+
|
|
358
|
+
# form parameters
|
|
359
|
+
form_params = opts[:form_params] || {}
|
|
360
|
+
|
|
361
|
+
# http body (model)
|
|
362
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
363
|
+
|
|
364
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
|
365
|
+
|
|
366
|
+
auth_names = opts[:auth_names] || []
|
|
367
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
368
|
+
:header_params => header_params,
|
|
369
|
+
:query_params => query_params,
|
|
370
|
+
:form_params => form_params,
|
|
371
|
+
:body => post_body,
|
|
372
|
+
:auth_names => auth_names,
|
|
373
|
+
:return_type => return_type)
|
|
374
|
+
|
|
375
|
+
if @api_client.config.debugging
|
|
376
|
+
@api_client.config.logger.debug "API called: APIKeysApi#post_api_key_generate_web3_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
377
|
+
end
|
|
378
|
+
return data, status_code, headers
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
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 AudioApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# /api/v1/audio/speech
|
|
20
|
+
# Converts text to speech using various voice models and formats.
|
|
21
|
+
# @param [Hash] opts the optional parameters
|
|
22
|
+
# @option opts [CreateSpeechRequestSchema] :body
|
|
23
|
+
# @return [String]
|
|
24
|
+
def create_speech(opts = {})
|
|
25
|
+
data, _status_code, _headers = create_speech_with_http_info(opts)
|
|
26
|
+
data
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# /api/v1/audio/speech
|
|
30
|
+
# Converts text to speech using various voice models and formats.
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @option opts [CreateSpeechRequestSchema] :body
|
|
33
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
34
|
+
def create_speech_with_http_info(opts = {})
|
|
35
|
+
if @api_client.config.debugging
|
|
36
|
+
@api_client.config.logger.debug 'Calling API: AudioApi.create_speech ...'
|
|
37
|
+
end
|
|
38
|
+
# resource path
|
|
39
|
+
local_var_path = '/audio/speech'
|
|
40
|
+
|
|
41
|
+
# query parameters
|
|
42
|
+
query_params = opts[:query_params] || {}
|
|
43
|
+
|
|
44
|
+
# header parameters
|
|
45
|
+
header_params = opts[:header_params] || {}
|
|
46
|
+
# HTTP header 'Accept' (if needed)
|
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['audio/aac', 'audio/flac', 'audio/mpeg', 'audio/opus', 'audio/pcm', 'audio/wav', 'application/json'])
|
|
48
|
+
# HTTP header 'Content-Type'
|
|
49
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
|
56
|
+
|
|
57
|
+
return_type = opts[:return_type] || 'String'
|
|
58
|
+
|
|
59
|
+
auth_names = opts[:auth_names] || ['BearerAuth']
|
|
60
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => return_type)
|
|
67
|
+
|
|
68
|
+
if @api_client.config.debugging
|
|
69
|
+
@api_client.config.logger.debug "API called: AudioApi#create_speech\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
70
|
+
end
|
|
71
|
+
return data, status_code, headers
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|