indoxrouter 0.1.23__tar.gz → 0.1.25__tar.gz

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.
@@ -0,0 +1,344 @@
1
+ ## Privacy Policy:
2
+
3
+ **Established & Effective Date:** March 2025
4
+
5
+ **Update:** Jun 15, 2025
6
+
7
+ We at [Indox Router](https://indoxrouter.com/en-US), a subsidiary of Nemati AI (the "Company", "we", or "us") are committed to safeguarding the privacy of our customers. This Privacy Policy outlines how your **Personal Information** or **Usage Information** will be collected, used, shared, stored protected, or disclosed by our services (including [Indox Router](https://indoxrouter.com/en-US) ).
8
+
9
+ This Privacy Policy applies to the websites developed by us in relation to the services provided to you by the Company from time to time ("Services").
10
+
11
+ By using our Services, you agree to be bound by the terms of this Privacy Policy. If you do not accept the terms of this Privacy Policy, you are directed to discontinue accessing or using our applications in any way. We strongly recommend that you read this policy carefully before proceeding with any transaction on our platform.
12
+
13
+ ### Terms of Use:
14
+
15
+ Please read these **Terms of Use** ("Agreement") carefully before using the services offered by **Indox Router LLC** ("Company"), a subsidiary of **Nemati AI**.
16
+
17
+ By visiting the website [Indox Router](https://indoxrouter.com/en-US) and/or using the services in any manner, you agree that you have read, understood, and accept to be bound by these terms and conditions. If the terms of this Agreement are considered an offer, acceptance is expressly limited to such terms.
18
+
19
+ If you do not unconditionally agree to all the terms and conditions of this Agreement, you have no right to use the website [Indox Router](https://indoxrouter.com/en-US) , applications, extensions, or services provided by **[Indox Router](https://indoxrouter.com/en-US) **.
20
+
21
+ Use of the Company's services is expressly conditioned upon your acceptance of these terms.
22
+
23
+ - **Company Information:**
24
+
25
+ - **Name:** Indox Router LLC (referred to as "Indox Router", "We", "Us", or "Our")
26
+ - **Parent Company:** Nemati AI
27
+ - **Address:** 7343 N Teutonia Ave, Unit 7
28
+ - **State:** Wisconsin
29
+ - **City:** Milwaukee
30
+ - **Zip Code:** 53209
31
+ - **Country:** United States of America
32
+ - **Phone Number:** +1 (971) 400 2132
33
+
34
+ - **Website:** [Indox Router](https://indoxrouter.com/en-US)
35
+
36
+ - **Email:** [Support@indoxrouter.com](mailto:Support@indoxrouter.com)
37
+
38
+ ### Information We Collect:
39
+
40
+ We gather information about you for the following general purposes: to facilitate registration and manage your account, including providing access to and use of our Services; to communicate with you, including sharing information about us; to enable the publication of your reviews, forum posts, and other content; to respond to your questions and comments; to prevent potentially prohibited or illegal activities; and to enforce our Terms of Use.
41
+
42
+ ### **Collecting and Using Your Personal Data:**
43
+
44
+ When you visit or use our Services, we collect information about your computer or mobile device.
45
+
46
+ Below are some details of the types of data we collect:
47
+
48
+ #### Technical Information:
49
+
50
+ We gather the IP address of the computer used to access our services, the mobile device ID (a unique identifier assigned by the manufacturer), and technical details about your computer or mobile device (such as device type, web browser, and operating system). This information helps us optimize the performance of our software on your devices and resolve any issues that may arise.
51
+
52
+ #### Content Characteristics:
53
+
54
+ When you use our services, we collect data from the inputs, file uploads, and feedback ("Content") you provide. This information is essential for the proper functionality of features like **"History."**
55
+
56
+ #### Cookies:
57
+
58
+ When accessing our mobile or web application through a computer, we place "Cookies" on your device to identify it. "Cookies" are identifiers transferred to your computer or mobile device that allow us to recognize your browser or device and track how and when pages and features in our Services are accessed, as well as how many people visit them. You may adjust your browser or mobile device settings to prevent or limit the acceptance of cookies; however, this may restrict your ability to use some features of our Services.
59
+
60
+ If you click on a link to a third-party website, that third party may also transmit cookies to you. Please note that this Privacy Policy does not govern the use of cookies by any third parties, and by continuing to use our Services, you acknowledge and accept this.
61
+
62
+ #### Personal Data:
63
+
64
+ While using our services, we may ask you to provide certain personally identifiable information that can be used to contact or identify you. Personally identifiable information may include, but is not limited to:
65
+
66
+ - **Email address**
67
+ - **First name and last name**
68
+ - **Usage and content generation data**
69
+ - **Phone number**
70
+ - **location data**
71
+
72
+ #### How We Use Your Information:
73
+
74
+ The Company may use Personal Data for the following purposes:
75
+
76
+ - **To provide and maintain our Service**:
77
+
78
+ This includes monitoring the usage of our Service.
79
+
80
+ - **To manage Your Account**:
81
+
82
+ This involves managing Your registration as a user of the Service. The Personal Data You provide grants You access to various functionalities of the Service available to You as a registered user.
83
+
84
+ - **For the performance of a contract**:
85
+
86
+ This covers the development, compliance, and execution of the purchase contract for products, items, or services You have purchased, or any other contract with Us through the Service.
87
+
88
+ - **To contact You**:
89
+
90
+ We may contact You via email or other equivalent forms of electronic communication, such as push notifications from a mobile application. These communications may include updates or information related to the functionalities, products, or contracted services, including security updates, when necessary or reasonable for their implementation.
91
+
92
+ - **To provide You with news and offers**:
93
+
94
+ This includes providing You with news, special offers, and general information about other goods, services, and events we offer that are similar to those You have already purchased or inquired about, unless You have opted out of receiving such information.
95
+
96
+ - **To manage Your requests**:
97
+
98
+ This involves attending to and managing any requests You make to Us.
99
+
100
+ - **To deliver targeted advertising**:
101
+
102
+ We may use Your information to develop and display content and advertising, including working with third-party vendors, tailored to Your interests and/or location. This also includes measuring the effectiveness of such advertising.
103
+
104
+ - **For other purposes**:
105
+
106
+ Your information may be used for other purposes, such as data analysis, identifying usage trends, determining the effectiveness of our promotional campaigns, and evaluating and improving our Service, products, services, marketing strategies, and overall user experience.
107
+
108
+ ## **With whom we share your information?**
109
+
110
+ We neither rent nor sell your information in personally identifiable form to anyone to monetize through ads or leads.
111
+
112
+ However, we do share your Personal Information with third parties as described below:
113
+
114
+ **Third-party vendors:**
115
+
116
+ We employ third-party vendors to provide services on our behalf for varied purposes, such as business analytics, customer service, marketing, distribution, payment processing, live chat, etc. We may authorize these vendors to collect information on our behalf to operate features of our application or deliver services tailored to your needs. We ensure that such information is used solely to perform their functions, and they are not permitted to share or use that information for any other purpose.ش
117
+
118
+ **Companies within our corporate family:**
119
+
120
+ We may be required to provide information about you to our parent company, Nemati AI, subsidiary, or corporate affiliates. To the extent that our parent company, subsidiaries, or corporate affiliates have information about you, they will adhere to the best practices described in this Privacy Policy when using your information.
121
+
122
+ **Business Partners:**
123
+
124
+ We collaborate with Business Partners in offering our services to you. If you choose to access optional services provided by these partners, we may share information about you, including your personal information, with them. Please note that we do not control the privacy practices of these third-party Business Partners.
125
+
126
+ **User Profiles and Submissions:**
127
+
128
+ Certain user profile information, including but not limited to a user's name, location, and any video or image content uploaded to the Services, may be displayed to other users to facilitate interaction within the Services or address your requests for the Company's services. Any content you upload to your public user profile, along with any Personal Information or content voluntarily disclosed online in areas visible to others (e.g., discussion boards, messages, chat areas), becomes publicly available and may be collected and used by others. Your username may also be displayed to other users if and when you send messages, post comments, or upload images or videos through the Services. Other users may contact you through messages and comments. Please note that we do not control the policies and practices of third-party sites or services interacting with our Services.
129
+
130
+ **Affiliated Websites:**
131
+
132
+ If you were referred to us from another website, we might need to share registration information, including but not limited to your name, email address, and phone numbers. In such cases, we encourage you to review the Privacy Policy of the referring website. We are not responsible for their handling of your information.
133
+
134
+ **Business Transfers:**
135
+
136
+ If we choose to buy or sell assets, customer information is typically one of the business assets transferred. Similarly, if we (or our assets) are acquired, or if we go out of business, enter bankruptcy, or undergo another change of control, Personal Information may be one of the assets transferred to or acquired by a third party.
137
+
138
+ **Government Bodies:**
139
+
140
+ We may disclose your Personal Information and Usage Information when required by law, such as responding to a subpoena, court order, government demand, or other legal requirements to protect our interests. In such cases, we will contact you via email. Communications sent to your provided email address will be deemed as having been communicated to you.
141
+
142
+ ### Retention of Your Personal Data:
143
+
144
+ The Company will retain Your Personal Data only for as long as necessary to fulfill the purposes outlined in this Privacy Policy. We will retain and use Your Personal Data to the extent required to comply with our legal obligations (for instance, if applicable laws mandate data retention), resolve disputes, and enforce our legal agreements and policies.
145
+
146
+ ## How Do We Protect Your Information:
147
+
148
+ We want you to feel completely confident that your information is safe and secure with us. We adhere to generally accepted standards to safeguard the Personal Information and Usage Information submitted to us. While no services can guarantee foolproof security, we have implemented appropriate administrative, technical, and security procedures to keep your information intact, secure, and confidential. Your information is accessed only for necessary purposes by authorized employees, agents, or third-party vendors. To ensure its security, we use firewalls, encryption technologies, and intrusion detection systems to protect your information from unauthorized use.
149
+
150
+ ### What Happens When You Use Our Services from Outside Your Region?
151
+
152
+ If you are accessing our application from outside the United States, please note that your information may be transferred, stored, or processed in the United States, where our servers and central databases are located. Regardless of your location, we adhere to best practices to protect your information. By using our Services, you acknowledge that we operate under the United States Privacy and Data Protection Laws, which may differ significantly from those of your country.
153
+
154
+ The Company will take all reasonably necessary steps to ensure that your data is treated securely and in compliance with this Privacy Policy. No transfer of your Personal Data will occur to an organization or country unless adequate controls, including data security measures, are in place to protect your personal information.
155
+
156
+ ### Email Marketing:
157
+
158
+ We may use your personal data to send newsletters, marketing or promotional materials, and other information that may interest you.
159
+
160
+ You can opt out of receiving any or all of these communications by:
161
+
162
+ - Following the unsubscribe link or instructions provided in any email we send, or
163
+ - Contacting us directly.
164
+
165
+ For more details, you may review [Amazon SES's Privacy Policy](https://aws.amazon.com/cn/privacy/).
166
+
167
+ ### Payments:
168
+
169
+ We may use third-party services, such as **Stripe**, for payment processing.
170
+
171
+ We do not store or collect your payment card details. This information is provided directly to our third-party payment processors, whose use of your personal information is governed by their Privacy Policy. These payment processors comply with **PCI-DSS** standards, which are managed by the **PCI Security Standards Council**—a collaborative effort of brands like Visa, Mastercard, American Express, and Discover. **PCI-DSS requirements** ensure the secure handling of payment information.
172
+
173
+ You can review Stripe's Privacy Policy [here](https://stripe.com/privacy).
174
+
175
+ # GDPR Privacy:
176
+
177
+ ### Legal Basis for Processing Personal Data under GDPR:
178
+
179
+ We may process Personal Data under the following conditions:
180
+
181
+ - **Consent**:
182
+
183
+ You have given Your consent for processing Personal Data for one or more specific purposes.
184
+
185
+ - **Performance of a contract**:
186
+
187
+ Provision of Personal Data is necessary for the performance of an agreement with You and/or for any pre-contractual obligations thereof.
188
+
189
+ - **Legal obligations**:
190
+
191
+ Processing Personal Data is necessary for compliance with a legal obligation to which the Company is subject.
192
+
193
+ - **Vital interests**:
194
+
195
+ Processing Personal Data is necessary in order to protect Your vital interests or those of another natural person.
196
+
197
+ - **Public interests**:
198
+
199
+ Processing Personal Data is related to a task that is carried out in the public interest or in the exercise of official authority vested in the Company.
200
+
201
+ - **Legitimate interests**:
202
+
203
+ Processing Personal Data is necessary for the purposes of the legitimate interests pursued by the Company.
204
+
205
+ In any case, the Company will gladly help to clarify the specific legal basis that applies to the processing, and in particular whether the provision of Personal Data is a statutory or contractual requirement, or a requirement necessary to enter into a contract.
206
+
207
+ Your Rights under the GDPR:
208
+
209
+ The Company undertakes to respect the confidentiality of Your Personal Data and to guarantee that You can exercise Your rights.
210
+
211
+ You have the right under this Privacy Policy, and by law if You are
212
+ within the EU, to:
213
+
214
+ - **Request access to Your Personal Data**:
215
+
216
+ The right to access, update, or delete the information We have on You. Whenever possible, You can access, update, or request deletion of Your Personal Data directly within Your account settings section. If You are unable to perform these actions yourself, please contact Us to assist You. This also enables You to receive a copy of the Personal Data We hold about You.
217
+
218
+ - **Request correction of the Personal Data that We hold about You**:
219
+
220
+ You have the right to have any incomplete or inaccurate information We hold about You corrected.
221
+
222
+ - **Object to processing of Your Personal Data**:
223
+
224
+ This right exists where We are relying on a legitimate interest as the legal basis for Our processing and there is something about Your particular situation that makes You want to object to Our processing of Your Personal Data on this ground. You also have the right to object where We are processing Your Personal Data for direct marketing purposes.
225
+
226
+ - **Request erasure of Your Personal Data**:
227
+
228
+ You have the right to ask Us to delete or remove Personal Data when there is no good reason for Us to continue processing it.
229
+
230
+ - **Request the transfer of Your Personal Data**: We will provide to
231
+
232
+ You, or to a third-party You have chosen, Your Personal Data in a structured, commonly used, machine-readable format. Please note that this right only applies to automated information which You initially provided consent for Us to use or where We used the information to perform a contract with You.
233
+
234
+ - **Withdraw Your consent**:
235
+
236
+ You have the right to withdraw Your consent to the use of Your Personal Data. If You withdraw Your consent, We may not be able to provide You with access to certain specific functionalities of the Service.
237
+
238
+ ## CCPA Privacy:
239
+
240
+ This privacy notice section for California residents supplements the information contained in Our Privacy Policy and applies solely to all visitors, users, and others who reside in the State of California.
241
+
242
+ **Sources of Personal Information:**
243
+
244
+ We obtain the categories of personal information listed above from the
245
+ following categories of sources:
246
+
247
+ - **Directly from You.** For example, from the forms You complete on our Service, preferences You express or provide through our Service, or from Your purchases on our Service.
248
+ - **Indirectly from You.** For example, from observing Your activity on our Service.
249
+ - **Automatically from You.** For example, through cookies We or our Service Providers set on Your Device as You navigate through our Service.
250
+ - **From Service Providers.** For example, third-party vendors to monitor and analyze the use of our Service, third-party vendors to provide advertising on our Service, third-party vendors to deliver targeted advertising to You, third-party vendors for payment processing, or other third-party vendors that We use to provide the Service to You.
251
+
252
+ **Use of Personal Information for Business Purposes or Commercial
253
+ Purposes:**
254
+
255
+ We may use or disclose personal information We collect for "business
256
+ purposes" or "commercial purposes" (as defined under the CCPA), which
257
+ may include the following examples:
258
+
259
+ - To operate our Service and provide You with our Service.
260
+ - To provide You with support and respond to Your inquiries, including investigating and addressing Your concerns and monitoring and improving our Service.
261
+ - To fulfill or meet the reason You provided the information. For example, if You share Your contact information to ask a question about our Service, We will use that personal information to respond to Your inquiry. If You provide Your personal information to purchase a product or service, We will use that information to
262
+ process Your payment and facilitate delivery.
263
+
264
+ - To respond to law enforcement requests and as required by applicable law, court order, or governmental regulations.
265
+ - As described to You when collecting Your personal information or as otherwise set forth in the CCPA. For internal administrative and auditing purposes.
266
+ - To detect security incidents and protect against malicious, deceptive, fraudulent, or illegal activity, including, when necessary, prosecuting those responsible for such activities.
267
+
268
+ Please note that the examples provided above are illustrative and not intended to be exhaustive. For more details on how we use this information, please refer to the "Use of Your Personal Data" section. If We decide to collect additional categories of personal information or use the personal information We collected for materially different, unrelated, or incompatible purposes, We will update this Privacy Policy.
269
+
270
+ ## Personal Information of Minors:
271
+
272
+ If you have reason to believe that a child under the age of 13 (or 16) has provided us with personal information, please contact us with sufficient detail to enable us to delete that information.
273
+
274
+ ## Your Rights under the CCPA:
275
+
276
+ The CCPA provides California residents with specific rights regarding their personal information.
277
+
278
+ If you are a resident of California, you have the following rights:
279
+
280
+ ### The Right to Notice:
281
+
282
+ You have the right to be notified of which categories of Personal Data are being collected and the purposes for which the Personal Data is being used.
283
+
284
+ ### The Right to Request:
285
+
286
+ Under the CCPA, you have the right to request that we disclose information to you about our collection, use, sale, disclosure for business purposes, and sharing of personal information.
287
+
288
+ Once we receive and confirm your request, we will disclose to you:
289
+
290
+ - The categories of personal information we collected about you.
291
+ - The categories of sources for the personal information we collected about you.
292
+ - Our business or commercial purpose for collecting or selling that personal information.
293
+ - The categories of third parties with whom we share that personal information.
294
+ - The specific pieces of personal information we collected about you.
295
+
296
+ If we sold your personal information or disclosed your personal information for a business purpose, we will disclose to you:
297
+
298
+ - The categories of personal information sold.
299
+ - The categories of personal information disclosed.
300
+
301
+ ### The Right to Say No to the Sale of Personal Data (Opt-Out):
302
+
303
+ You have the right to direct us not to sell your personal information. To submit an opt-out request, please contact us.
304
+
305
+ ### The Right to Delete Personal Data:
306
+
307
+ You have the right to request the deletion of your Personal Data, subject to certain exceptions. Once we receive and confirm your request, we will delete (and direct our Service Providers to delete) your personal information from our records, unless an exception applies.
308
+
309
+ We may deny your deletion request if retaining the information is necessary for us or our Service Providers to:
310
+
311
+ - Complete the transaction for which we collected the personal information, provide a good or service that you requested, take actions reasonably anticipated within the context of our ongoing business relationship with you, or otherwise perform our contract with you.
312
+ - Detect security incidents, protect against malicious, deceptive, fraudulent, or illegal activity, or prosecute those responsible for such activities.
313
+ - Debug products to identify and repair errors that impair existing intended functionality.
314
+ - Exercise free speech, ensure the right of another consumer to exercise their free speech rights, or exercise another right provided for by law.
315
+ - Comply with the California Electronic Communications Privacy Act (Cal. Penal Code § 1546 et seq.).
316
+ - Engage in public or peer-reviewed scientific, historical, or statistical research in the public interest that adheres to all other applicable ethics and privacy laws, when the information's deletion may likely render impossible or seriously impair the research's achievement, if you previously provided informed consent.
317
+ - Enable solely internal uses that are reasonably aligned with consumer expectations based on your relationship with us.
318
+ - Comply with a legal obligation.
319
+ - Make other internal and lawful uses of that information that are compatible with the context in which you provided it.
320
+
321
+ ### The Right Not to Be Discriminated Against:
322
+
323
+ You have the right not to be discriminated against for exercising any of your consumer rights, including by:
324
+
325
+ - Denying goods or services to you.
326
+ - Charging different prices or rates for goods or services, including the use of discounts or other benefits or imposing penalties.
327
+ - Providing a different level or quality of goods or services to you.
328
+ - Suggesting that you will receive a different price or rate for goods or services or a different level or quality of goods or services.
329
+
330
+ ## Changes to this Privacy Policy:
331
+
332
+ We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page.
333
+
334
+ We will also inform you via email and/or a prominent notice on our Service prior to the changes becoming effective, and we will update the "Last updated" date at the top of this Privacy Policy.
335
+
336
+ You are encouraged to review this Privacy Policy periodically for any changes. Updates to this Privacy Policy become effective as soon as they are posted on this page.
337
+
338
+ ## Contact Us:
339
+
340
+ **Company:** Indox Router LLC, a subsidiary of Nemati AI
341
+
342
+ **Email:** Support@indoxrouter.com
343
+
344
+ or [Customer Support](https://indoxrouter.com/en-US/support) page.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: indoxrouter
3
- Version: 0.1.23
3
+ Version: 0.1.25
4
4
  Summary: A unified client for various AI providers
5
5
  Author-email: indoxRouter Team <ashkan.eskandari.dev@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/indoxrouter/indoxrouter
8
8
  Project-URL: Repository, https://github.com/indoxrouter/indoxrouter
9
9
  Project-URL: Issues, https://github.com/indoxrouter/indoxrouter/issues
10
- Keywords: ai,api,client,openai,anthropic,google,mistral,xai,imagen,grok,image-generation
10
+ Keywords: ai,api,client,openai,anthropic,google,mistral,xai,imagen,grok,image-generation,text-to-speech,tts,audio
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: Programming Language :: Python :: 3
@@ -18,17 +18,19 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Requires-Python: >=3.8
20
20
  Description-Content-Type: text/markdown
21
+ License-File: LICENSE
21
22
  Requires-Dist: requests>=2.25.0
22
23
  Requires-Dist: python-dotenv>=1.0.0
24
+ Dynamic: license-file
23
25
 
24
- # IndoxRouter Client
26
+ # IndoxRouter
25
27
 
26
28
  A unified client for various AI providers, including OpenAI, anthropic, Google, and Mistral.
27
29
 
28
30
  ## Features
29
31
 
30
32
  - **Unified API**: Access multiple AI providers through a single API
31
- - **Simple Interface**: Easy-to-use methods for chat, completion, embeddings, and image generation
33
+ - **Simple Interface**: Easy-to-use methods for chat, completion, embeddings, image generation, and text-to-speech
32
34
  - **Error Handling**: Standardized error handling across providers
33
35
  - **Authentication**: Secure cookie-based authentication
34
36
 
@@ -53,12 +55,6 @@ client = Client(api_key="your_api_key")
53
55
  import os
54
56
  os.environ["INDOX_ROUTER_API_KEY"] = "your_api_key"
55
57
  client = Client()
56
-
57
- # Connect to a custom server
58
- client = Client(
59
- api_key="your_api_key",
60
- base_url="https://your-indoxrouter-server.com"
61
- )
62
58
  ```
63
59
 
64
60
  ### Authentication
@@ -75,22 +71,6 @@ IndoxRouter uses cookie-based authentication with JWT tokens. The client handles
75
71
  client = Client(api_key="your_api_key")
76
72
  ```
77
73
 
78
- ### Testing Your API Key
79
-
80
- The package includes a test script to verify your API key and connection:
81
-
82
- ```bash
83
- # Run the test script with your API key
84
- python -m indoxrouter.test_api_key --api-key YOUR_API_KEY
85
-
86
- # Or set the environment variable and run
87
- export INDOX_ROUTER_API_KEY=YOUR_API_KEY
88
- python -m indoxrouter.test_api_key
89
-
90
- # To see detailed debugging information
91
- python -m indoxrouter.test_api_key --debug
92
- ```
93
-
94
74
  ### Chat Completions
95
75
 
96
76
  ```python
@@ -103,7 +83,7 @@ response = client.chat(
103
83
  temperature=0.7
104
84
  )
105
85
 
106
- print(response["choices"][0]["message"]["content"])
86
+ print(response["data"])
107
87
  ```
108
88
 
109
89
  ### Text Completions
@@ -115,7 +95,7 @@ response = client.completion(
115
95
  max_tokens=100
116
96
  )
117
97
 
118
- print(response["choices"][0]["text"])
98
+ print(response["data"])
119
99
  ```
120
100
 
121
101
  ### Embeddings
@@ -144,27 +124,6 @@ response = client.images(
144
124
 
145
125
  print(f"Image URL: {response['data'][0]['url']}")
146
126
 
147
- # Google Imagen Image Generation
148
- from indoxrouter.constants import GOOGLE_IMAGE_MODEL
149
-
150
- response = client.images(
151
- prompt="A robot holding a red skateboard in a futuristic city",
152
- model=GOOGLE_IMAGE_MODEL,
153
- n=2, # Generate 2 images
154
- negative_prompt="broken, damaged, low quality",
155
- guidance_scale=7.5, # Control adherence to prompt
156
- seed=42, # For reproducible results
157
- )
158
-
159
- # xAI Grok Image Generation
160
- from indoxrouter.constants import XAI_IMAGE_MODEL
161
-
162
- response = client.images(
163
- prompt="A cat in a tree",
164
- model=XAI_IMAGE_MODEL,
165
- n=1,
166
- response_format="b64_json" # Get base64 encoded image
167
- )
168
127
 
169
128
  # Access base64 encoded image data
170
129
  if "b64_json" in response["data"][0]:
@@ -172,6 +131,22 @@ if "b64_json" in response["data"][0]:
172
131
  # Use the base64 data (e.g., to display in HTML or save to file)
173
132
  ```
174
133
 
134
+ ### Text-to-Speech
135
+
136
+ ```python
137
+ # Generate audio from text
138
+ response = client.text_to_speech(
139
+ input="Hello, welcome to IndoxRouter!",
140
+ model="openai/tts-1",
141
+ voice="alloy", # Options: alloy, echo, fable, onyx, nova, shimmer
142
+ response_format="mp3", # Options: mp3, opus, aac, flac
143
+ speed=1.0 # Range: 0.25 to 4.0
144
+ )
145
+
146
+ print(f"Audio generated successfully: {response['success']}")
147
+ print(f"Audio data available: {'data' in response}")
148
+ ```
149
+
175
150
  ### Streaming Responses
176
151
 
177
152
  ```python
@@ -180,9 +155,8 @@ for chunk in client.chat(
180
155
  model="openai/gpt-4o-mini",
181
156
  stream=True
182
157
  ):
183
- if chunk.get("choices") and len(chunk["choices"]) > 0:
184
- content = chunk["choices"][0].get("delta", {}).get("content", "")
185
- print(content, end="", flush=True)
158
+ if chunk.choices[0].delta.content:
159
+ print(chunk.choices[0].delta.content, end="", flush=True)
186
160
  ```
187
161
 
188
162
  ### Getting Available Models
@@ -200,35 +174,6 @@ openai_provider = client.models("openai")
200
174
  print(f"OpenAI models: {[m['id'] for m in openai_provider['models']]}")
201
175
  ```
202
176
 
203
- ## Error Handling
204
-
205
- ```python
206
- from indoxrouter import Client, ModelNotFoundError, ProviderError
207
-
208
- try:
209
- client = Client(api_key="your_api_key")
210
- response = client.chat(
211
- messages=[{"role": "user", "content": "Hello"}],
212
- model="nonexistent-provider/nonexistent-model"
213
- )
214
- except ModelNotFoundError as e:
215
- print(f"Model not found: {e}")
216
- except ProviderError as e:
217
- print(f"Provider error: {e}")
218
- ```
219
-
220
- ## Context Manager
221
-
222
- ```python
223
- with Client(api_key="your_api_key") as client:
224
- response = client.chat(
225
- messages=[{"role": "user", "content": "Hello!"}],
226
- model="openai/gpt-4o-mini"
227
- )
228
- print(response["choices"][0]["message"]["content"])
229
- # Client is automatically closed when exiting the block
230
- ```
231
-
232
177
  ## License
233
178
 
234
179
  This project is licensed under the MIT License - see the LICENSE file for details.