meshapi 0.1.8__tar.gz → 0.1.9__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.
- {meshapi-0.1.8 → meshapi-0.1.9}/PKG-INFO +24 -17
- {meshapi-0.1.8 → meshapi-0.1.9}/README.md +23 -16
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/__init__.py +1 -1
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/_http.py +1 -1
- {meshapi-0.1.8 → meshapi-0.1.9}/pyproject.toml +1 -1
- {meshapi-0.1.8 → meshapi-0.1.9}/.gitignore +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/CHANGELOG.md +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/CLAUDE.md +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/TESTING.md +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/.env.livetest.example +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/compare.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/config.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/conftest.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/pytest.ini +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/requirements.txt +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/responses.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_audio.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_chat.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_compare.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_errors.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_feature_matrix.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_images_edit.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_inference_resources.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_models.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_moderations.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_rag.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_realtime.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_responses.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_router_select.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_stream.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_structured_output.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_templates.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_tool_calling.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_video.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/livetests/test_web_search.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/_errors.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/_types.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/__init__.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/audio.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/batches.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/chat.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/compare.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/embeddings.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/images.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/models.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/moderations.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/rag.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/realtime.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/responses.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/router_select.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/templates.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/videos.py +0 -0
- {meshapi-0.1.8 → meshapi-0.1.9}/meshapi/resources/web_search.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshapi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: Official Python SDK for the MeshAPI AI model gateway
|
|
5
5
|
Project-URL: Homepage, https://meshapi.ai
|
|
6
6
|
Project-URL: Documentation, https://developers.meshapi.ai
|
|
@@ -189,7 +189,8 @@ reply = client.responses.create(
|
|
|
189
189
|
)
|
|
190
190
|
)
|
|
191
191
|
|
|
192
|
-
# List background response jobs, or fetch
|
|
192
|
+
# List background response jobs, or fetch a persisted/background response by id.
|
|
193
|
+
# Synchronous create responses are not guaranteed to be retrievable via get().
|
|
193
194
|
jobs = client.responses.list(limit=20)
|
|
194
195
|
job = client.responses.get("resp_abc123")
|
|
195
196
|
```
|
|
@@ -211,7 +212,12 @@ print(len(result.data[0].embedding))
|
|
|
211
212
|
## Audio (TTS, STT, voices)
|
|
212
213
|
|
|
213
214
|
```python
|
|
214
|
-
from meshapi import
|
|
215
|
+
from meshapi import (
|
|
216
|
+
AudioTranslationsParams,
|
|
217
|
+
ListVoicesParams,
|
|
218
|
+
SpeechParams,
|
|
219
|
+
TranscriptionParams,
|
|
220
|
+
)
|
|
215
221
|
|
|
216
222
|
# Text-to-speech — returns raw audio bytes
|
|
217
223
|
audio_bytes = client.audio.synthesize(
|
|
@@ -224,24 +230,25 @@ audio_bytes = client.audio.synthesize(
|
|
|
224
230
|
with open("output.wav", "wb") as f:
|
|
225
231
|
f.write(audio_bytes)
|
|
226
232
|
|
|
227
|
-
# Speech-to-text —
|
|
233
|
+
# Speech-to-text — send raw audio bytes with a filename hint
|
|
234
|
+
with open("audio.wav", "rb") as f:
|
|
235
|
+
file_bytes = f.read()
|
|
236
|
+
|
|
228
237
|
result = client.audio.transcribe(
|
|
238
|
+
file_bytes,
|
|
229
239
|
TranscriptionParams(
|
|
230
240
|
model="sarvam/saaras:v3",
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
)
|
|
241
|
+
# Optional: language_code is model-specific (e.g. Sarvam expects "en-IN", not "en").
|
|
242
|
+
),
|
|
243
|
+
filename="audio.wav",
|
|
235
244
|
)
|
|
236
245
|
print(result.text)
|
|
237
246
|
|
|
238
|
-
# Translate audio to English
|
|
239
|
-
translated = client.audio.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
file_name="audio.wav",
|
|
244
|
-
)
|
|
247
|
+
# Translate audio directly to English
|
|
248
|
+
translated = client.audio.audio_translate(
|
|
249
|
+
file_bytes,
|
|
250
|
+
AudioTranslationsParams(model="openai/whisper-large-v3"),
|
|
251
|
+
filename="audio.wav",
|
|
245
252
|
)
|
|
246
253
|
print(translated.text)
|
|
247
254
|
|
|
@@ -599,7 +606,7 @@ from meshapi import (
|
|
|
599
606
|
BulkEmbedRequest, BulkEmbedResponse,
|
|
600
607
|
SearchRequest, SearchResponse, SearchResult,
|
|
601
608
|
# audio
|
|
602
|
-
SpeechParams, TranscriptionParams,
|
|
609
|
+
SpeechParams, TranscriptionParams, AudioTranslationsParams,
|
|
603
610
|
TranscriptionResponse, ListVoicesParams,
|
|
604
611
|
# video
|
|
605
612
|
VideoGenerationParams, VideoContentItem,
|
|
@@ -616,7 +623,7 @@ from meshapi import (
|
|
|
616
623
|
|
|
617
624
|
```python
|
|
618
625
|
import meshapi
|
|
619
|
-
print(meshapi.__version__) # "0.1.
|
|
626
|
+
print(meshapi.__version__) # "0.1.9"
|
|
620
627
|
```
|
|
621
628
|
|
|
622
629
|
## About Mesh API
|
|
@@ -152,7 +152,8 @@ reply = client.responses.create(
|
|
|
152
152
|
)
|
|
153
153
|
)
|
|
154
154
|
|
|
155
|
-
# List background response jobs, or fetch
|
|
155
|
+
# List background response jobs, or fetch a persisted/background response by id.
|
|
156
|
+
# Synchronous create responses are not guaranteed to be retrievable via get().
|
|
156
157
|
jobs = client.responses.list(limit=20)
|
|
157
158
|
job = client.responses.get("resp_abc123")
|
|
158
159
|
```
|
|
@@ -174,7 +175,12 @@ print(len(result.data[0].embedding))
|
|
|
174
175
|
## Audio (TTS, STT, voices)
|
|
175
176
|
|
|
176
177
|
```python
|
|
177
|
-
from meshapi import
|
|
178
|
+
from meshapi import (
|
|
179
|
+
AudioTranslationsParams,
|
|
180
|
+
ListVoicesParams,
|
|
181
|
+
SpeechParams,
|
|
182
|
+
TranscriptionParams,
|
|
183
|
+
)
|
|
178
184
|
|
|
179
185
|
# Text-to-speech — returns raw audio bytes
|
|
180
186
|
audio_bytes = client.audio.synthesize(
|
|
@@ -187,24 +193,25 @@ audio_bytes = client.audio.synthesize(
|
|
|
187
193
|
with open("output.wav", "wb") as f:
|
|
188
194
|
f.write(audio_bytes)
|
|
189
195
|
|
|
190
|
-
# Speech-to-text —
|
|
196
|
+
# Speech-to-text — send raw audio bytes with a filename hint
|
|
197
|
+
with open("audio.wav", "rb") as f:
|
|
198
|
+
file_bytes = f.read()
|
|
199
|
+
|
|
191
200
|
result = client.audio.transcribe(
|
|
201
|
+
file_bytes,
|
|
192
202
|
TranscriptionParams(
|
|
193
203
|
model="sarvam/saaras:v3",
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
)
|
|
204
|
+
# Optional: language_code is model-specific (e.g. Sarvam expects "en-IN", not "en").
|
|
205
|
+
),
|
|
206
|
+
filename="audio.wav",
|
|
198
207
|
)
|
|
199
208
|
print(result.text)
|
|
200
209
|
|
|
201
|
-
# Translate audio to English
|
|
202
|
-
translated = client.audio.
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
file_name="audio.wav",
|
|
207
|
-
)
|
|
210
|
+
# Translate audio directly to English
|
|
211
|
+
translated = client.audio.audio_translate(
|
|
212
|
+
file_bytes,
|
|
213
|
+
AudioTranslationsParams(model="openai/whisper-large-v3"),
|
|
214
|
+
filename="audio.wav",
|
|
208
215
|
)
|
|
209
216
|
print(translated.text)
|
|
210
217
|
|
|
@@ -562,7 +569,7 @@ from meshapi import (
|
|
|
562
569
|
BulkEmbedRequest, BulkEmbedResponse,
|
|
563
570
|
SearchRequest, SearchResponse, SearchResult,
|
|
564
571
|
# audio
|
|
565
|
-
SpeechParams, TranscriptionParams,
|
|
572
|
+
SpeechParams, TranscriptionParams, AudioTranslationsParams,
|
|
566
573
|
TranscriptionResponse, ListVoicesParams,
|
|
567
574
|
# video
|
|
568
575
|
VideoGenerationParams, VideoContentItem,
|
|
@@ -579,7 +586,7 @@ from meshapi import (
|
|
|
579
586
|
|
|
580
587
|
```python
|
|
581
588
|
import meshapi
|
|
582
|
-
print(meshapi.__version__) # "0.1.
|
|
589
|
+
print(meshapi.__version__) # "0.1.9"
|
|
583
590
|
```
|
|
584
591
|
|
|
585
592
|
## About Mesh API
|
|
@@ -140,7 +140,7 @@ from .resources.realtime import (
|
|
|
140
140
|
from .resources.responses import AsyncResponsesResource, ResponsesResource
|
|
141
141
|
from .resources.templates import AsyncTemplatesResource, TemplatesResource
|
|
142
142
|
|
|
143
|
-
__version__ = "0.1.
|
|
143
|
+
__version__ = "0.1.9"
|
|
144
144
|
__all__ = [
|
|
145
145
|
"__version__",
|
|
146
146
|
"MeshAPI",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|