synapsai-python 0.1.0__py3-none-any.whl

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,127 @@
1
+ # Copyright 2026 SynapsAI Technologies Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ Question Answering type definitions
17
+ """
18
+
19
+ from typing import Optional, Dict, Any, Union, List, Tuple, Literal
20
+ from pydantic import BaseModel, Field, ConfigDict
21
+
22
+ from .common import APIResponse, Usage
23
+
24
+
25
+ class QAAnswer(BaseModel):
26
+ """Generic QA answer (text QA)"""
27
+ score: float = Field(..., description="Answer confidence score")
28
+ start: int = Field(..., description="Start character index in the context")
29
+ end: int = Field(..., description="End character index in the context")
30
+ answer: str = Field(..., description="Extracted answer text")
31
+
32
+
33
+ class DocumentQAAnswer(QAAnswer):
34
+ """Document QA answer extends generic QA with word alignment indices"""
35
+ words: Optional[List[int]] = Field(default=None, description="Indices of words aligned to the answer, if available")
36
+
37
+
38
+ class DocumentQuestionAnsweringRequest(BaseModel):
39
+ """Request model for document question answering"""
40
+ model: str
41
+ image: Union[str, Any] = Field(..., description="Image input (URL, base64, file path, or PIL.Image)")
42
+ question: str = Field(..., description="Question to ask about the document")
43
+ word_boxes: Optional[List[Tuple[str, Tuple[float, float, float, float]]]] = Field(default=None, description="List of (word, bbox) with bbox normalized 0..1000")
44
+ top_k: Optional[int] = Field(default=1, description="Number of answers to return")
45
+ doc_stride: Optional[int] = Field(default=128, description="Overlap size when splitting long documents")
46
+ max_answer_len: Optional[int] = Field(default=15, description="Maximum answer length")
47
+ max_seq_len: Optional[int] = Field(default=384, description="Maximum total token length per chunk")
48
+ max_question_len: Optional[int] = Field(default=64, description="Maximum tokenized question length")
49
+ handle_impossible_answer: Optional[bool] = Field(default=False, description="Allow 'no answer' outcomes")
50
+ lang: Optional[str] = Field(default=None, description="OCR language when applicable")
51
+ tesseract_config: Optional[str] = Field(default=None, description="Extra OCR flags")
52
+ timeout: Optional[float] = Field(default=None, description="Fetch timeout for remote images")
53
+ model_config = ConfigDict(arbitrary_types_allowed=True)
54
+
55
+
56
+ class DocumentQuestionAnsweringResponse(APIResponse):
57
+ object: Literal["list"] = "list"
58
+ data: Union[DocumentQAAnswer, List[DocumentQAAnswer]]
59
+ usage: Optional[Usage] = None
60
+
61
+
62
+ class QuestionAnsweringRequest(BaseModel):
63
+ """Request model for extractive text question answering"""
64
+ model: str
65
+ question: Union[str, List[str]] = Field(..., description="Question(s) to answer")
66
+ context: Union[str, List[str]] = Field(..., description="Context(s) associated with the question(s)")
67
+ top_k: Optional[int] = Field(default=1, description="Number of answers to return")
68
+ doc_stride: Optional[int] = Field(default=128, description="Overlap size when splitting long contexts")
69
+ max_answer_len: Optional[int] = Field(default=15, description="Maximum answer length")
70
+ max_seq_len: Optional[int] = Field(default=384, description="Maximum total token length per chunk")
71
+ max_question_len: Optional[int] = Field(default=64, description="Maximum tokenized question length")
72
+ handle_impossible_answer: Optional[bool] = Field(default=False, description="Allow 'no answer' outcomes")
73
+ align_to_words: Optional[bool] = Field(default=True, description="Align answers to word boundaries where possible")
74
+
75
+
76
+ class QuestionAnsweringResponse(APIResponse):
77
+ object: Literal["list"] = "list"
78
+ data: Union[QAAnswer, List[QAAnswer]]
79
+ usage: Optional[Usage] = None
80
+
81
+
82
+ class TableQAAnswer(BaseModel):
83
+ """Table QA answer"""
84
+ answer: str = Field(..., description="Answer string")
85
+ coordinates: Optional[List[Tuple[int, int]]] = Field(default=None, description="Cell coordinates contributing to the answer")
86
+ cells: Optional[List[str]] = Field(default=None, description="Cell values contributing to the answer")
87
+ aggregator: Optional[str] = Field(default=None, description="Aggregation used, if any")
88
+
89
+
90
+ class TableQuestionAnsweringRequest(BaseModel):
91
+ """Request model for table question answering"""
92
+ model: str
93
+ table: Dict[str, Any] = Field(..., description="Table data as a JSON-serializable dict (converted to DataFrame server-side)")
94
+ query: Union[str, List[str]] = Field(..., description="Query or queries over the table")
95
+ sequential: Optional[bool] = Field(default=False, description="Run sequentially (required for conversational models)")
96
+ padding: Optional[Union[bool, str]] = Field(default=False, description="Padding strategy")
97
+ truncation: Optional[Union[bool, str]] = Field(default=False, description="Truncation strategy")
98
+
99
+
100
+ class TableQuestionAnsweringResponse(APIResponse):
101
+ object: Literal["list"] = "list"
102
+ data: Union[TableQAAnswer, List[TableQAAnswer]]
103
+ usage: Optional[Usage] = None
104
+
105
+
106
+ class VQAResult(BaseModel):
107
+ """Visual QA single result"""
108
+ label: str = Field(..., description="Predicted label/answer")
109
+ score: float = Field(..., description="Confidence score")
110
+
111
+
112
+ class VisualQuestionAnsweringRequest(BaseModel):
113
+ """Request model for visual question answering"""
114
+ model: str
115
+ image: Union[str, List[str], Any] = Field(..., description="Image input(s) (URL, base64, file path, or PIL.Image)")
116
+ question: Union[str, List[str]] = Field(..., description="Question(s) about the image(s)")
117
+ top_k: Optional[int] = Field(default=5, description="Number of answers to return")
118
+ timeout: Optional[float] = Field(default=None, description="Fetch timeout for remote images")
119
+ model_config = ConfigDict(arbitrary_types_allowed=True)
120
+
121
+
122
+ class VisualQuestionAnsweringResponse(APIResponse):
123
+ object: Literal["list"] = "list"
124
+ data: List[VQAResult]
125
+ usage: Optional[Usage] = None
126
+
127
+
@@ -0,0 +1,40 @@
1
+ # Copyright 2026 SynapsAI Technologies Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ Text ranking type definitions
17
+ """
18
+
19
+ from typing import List, Optional
20
+ from pydantic import BaseModel
21
+ from .common import Usage
22
+
23
+
24
+ class RerankRequest(BaseModel):
25
+ model: str
26
+ query: str
27
+ documents: List[str]
28
+ top_n: Optional[int] = None
29
+ max_tokens_per_doc: int = 4096
30
+
31
+
32
+ class RerankResult(BaseModel):
33
+ index: int
34
+ relevance_score: float
35
+
36
+
37
+ class RerankResponse(BaseModel):
38
+ id: Optional[str] = None
39
+ results: List[RerankResult]
40
+ usage: Optional[Usage] = None
@@ -0,0 +1,92 @@
1
+ # Copyright 2026 SynapsAI Technologies Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ Video generation type definitions
17
+ """
18
+
19
+ from enum import Enum
20
+ from typing import Literal, Optional, Union
21
+ from PIL import Image
22
+
23
+ from pydantic import BaseModel, Field
24
+
25
+ from .common import APIResponse
26
+
27
+
28
+ VideoInputReference = Union[str, bytes]
29
+
30
+
31
+ class VideoStatus(str, Enum):
32
+ """Video generation lifecycle states"""
33
+
34
+ QUEUED = "queued"
35
+ IN_PROGRESS = "in_progress"
36
+ COMPLETED = "completed"
37
+ FAILED = "failed"
38
+
39
+
40
+ class VideoContentVariant(str, Enum):
41
+ """Downloadable video asset variants"""
42
+
43
+ VIDEO = "video"
44
+ THUMBNAIL = "thumbnail"
45
+ SPRITESHEET = "spritesheet"
46
+
47
+
48
+ class VideoCreateError(BaseModel):
49
+ """Video generation error details"""
50
+
51
+ code: Optional[str] = None
52
+ message: Optional[str] = None
53
+
54
+
55
+ class VideoCreateRequest(BaseModel):
56
+ """Video creation request"""
57
+
58
+ model: str
59
+ prompt: str = Field(description="Text prompt that describes the video to generate")
60
+ input_reference: Optional[VideoInputReference] = Field(
61
+ default=None,
62
+ description="Optional reference video or asset as base64, URL, bytes, or file path",
63
+ )
64
+ seconds: int = 4
65
+ size: str = "720x1280"
66
+ num_inference_steps: int = 25
67
+ guidance_scale: float = 5.0
68
+ fps: int = 16
69
+
70
+
71
+ class Video(APIResponse):
72
+ """Structured information describing a generated video job"""
73
+
74
+ id: str
75
+ object: Literal["video"] = "video"
76
+ created_at: int
77
+ completed_at: Optional[int] = None
78
+ error: Optional[VideoCreateError] = None
79
+ expires_at: Optional[int] = None
80
+ model: str
81
+ prompt: Optional[str] = None
82
+ seconds: int
83
+ size: str
84
+ status: VideoStatus
85
+
86
+
87
+ class VideoDeleteResponse(APIResponse):
88
+ """Confirmation payload returned after deleting a video"""
89
+
90
+ id: str
91
+ deleted: bool
92
+ object: Literal["video.deleted"] = "video.deleted"
synapsai/utils.py ADDED
@@ -0,0 +1,32 @@
1
+ # Copyright 2026 SynapsAI Technologies Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """
16
+ Utility functions for SynapsAI client library
17
+ """
18
+
19
+ def build_url(base: str, endpoint: str) -> str:
20
+ """
21
+ Build a URL from a base URL and an endpoint.
22
+
23
+ Args:
24
+ base: Base URL.
25
+ endpoint: Endpoint.
26
+
27
+ Returns:
28
+ URL.
29
+ """
30
+ base = base.rstrip("/")
31
+ endpoint = endpoint.lstrip("/")
32
+ return f"{base}/{endpoint}"
@@ -0,0 +1,312 @@
1
+ Metadata-Version: 2.4
2
+ Name: synapsai-python
3
+ Version: 0.1.0
4
+ Summary: The official SynapsAI Cloud Python SDK
5
+ Home-page: https://github.com/synapsai-cloud/synapsai
6
+ Author: SynapsAI Technologies Inc.
7
+ Author-email: "SynapsAI Technologies Inc." <support@synapsai.cloud>
8
+ License: Apache License
9
+ Version 2.0, January 2004
10
+ http://www.apache.org/licenses/
11
+
12
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
13
+
14
+ 1. Definitions.
15
+
16
+ "License" shall mean the terms and conditions for use, reproduction,
17
+ and distribution as defined by Sections 1 through 9 of this document.
18
+
19
+ "Licensor" shall mean the copyright owner or entity authorized by
20
+ the copyright owner that is granting the License.
21
+
22
+ "Legal Entity" shall mean the union of the acting entity and all
23
+ other entities that control, are controlled by, or are under common
24
+ control with that entity. For the purposes of this definition,
25
+ "control" means (i) the power, direct or indirect, to cause the
26
+ direction or management of such entity, whether by contract or
27
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
28
+ outstanding shares, or (iii) beneficial ownership of such entity.
29
+
30
+ "You" (or "Your") shall mean an individual or Legal Entity
31
+ exercising permissions granted by this License.
32
+
33
+ "Source" form shall mean the preferred form for making modifications,
34
+ including but not limited to software source code, documentation
35
+ source, and configuration files.
36
+
37
+ "Object" form shall mean any form resulting from mechanical
38
+ transformation or translation of a Source form, including but
39
+ not limited to compiled object code, generated documentation,
40
+ and conversions to other media types.
41
+
42
+ "Work" shall mean the work of authorship, whether in Source or
43
+ Object form, made available under the License, as indicated by a
44
+ copyright notice that is included in or attached to the work
45
+ (an example is provided in the Appendix below).
46
+
47
+ "Derivative Works" shall mean any work, whether in Source or Object
48
+ form, that is based on (or derived from) the Work and for which the
49
+ editorial revisions, annotations, elaborations, or other modifications
50
+ represent, as a whole, an original work of authorship. For the purposes
51
+ of this License, Derivative Works shall not include works that remain
52
+ separable from, or merely link (or bind by name) to the interfaces of,
53
+ the Work and Derivative Works thereof.
54
+
55
+ "Contribution" shall mean any work of authorship, including
56
+ the original version of the Work and any modifications or additions
57
+ to that Work or Derivative Works thereof, that is intentionally
58
+ submitted to Licensor for inclusion in the Work by the copyright owner
59
+ or by an individual or Legal Entity authorized to submit on behalf of
60
+ the copyright owner. For the purposes of this definition, "submitted"
61
+ means any form of electronic, verbal, or written communication sent
62
+ to the Licensor or its representatives, including but not limited to
63
+ communication on electronic mailing lists, source code control systems,
64
+ and issue tracking systems that are managed by, or on behalf of, the
65
+ Licensor for the purpose of discussing and improving the Work, but
66
+ excluding communication that is conspicuously marked or otherwise
67
+ designated in writing by the copyright owner as "Not a Contribution."
68
+
69
+ "Contributor" shall mean Licensor and any individual or Legal Entity
70
+ on behalf of whom a Contribution has been received by Licensor and
71
+ subsequently incorporated within the Work.
72
+
73
+ 2. Grant of Copyright License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ copyright license to reproduce, prepare Derivative Works of,
77
+ publicly display, publicly perform, sublicense, and distribute the
78
+ Work and such Derivative Works in Source or Object form.
79
+
80
+ 3. Grant of Patent License. Subject to the terms and conditions of
81
+ this License, each Contributor hereby grants to You a perpetual,
82
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+ (except as stated in this section) patent license to make, have made,
84
+ use, offer to sell, sell, import, and otherwise transfer the Work,
85
+ where such license applies only to those patent claims licensable
86
+ by such Contributor that are necessarily infringed by their
87
+ Contribution(s) alone or by combination of their Contribution(s)
88
+ with the Work to which such Contribution(s) was submitted. If You
89
+ institute patent litigation against any entity (including a
90
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
91
+ or a Contribution incorporated within the Work constitutes direct
92
+ or contributory patent infringement, then any patent licenses
93
+ granted to You under this License for that Work shall terminate
94
+ as of the date such litigation is filed.
95
+
96
+ 4. Redistribution. You may reproduce and distribute copies of the
97
+ Work or Derivative Works thereof in any medium, with or without
98
+ modifications, and in Source or Object form, provided that You
99
+ meet the following conditions:
100
+
101
+ (a) You must give any other recipients of the Work or
102
+ Derivative Works a copy of this License; and
103
+
104
+ (b) You must cause any modified files to carry prominent notices
105
+ stating that You changed the files; and
106
+
107
+ (c) You must retain, in the Source form of any Derivative Works
108
+ that You distribute, all copyright, patent, trademark, and
109
+ attribution notices from the Source form of the Work,
110
+ excluding those notices that do not pertain to any part of
111
+ the Derivative Works; and
112
+
113
+ (d) If the Work includes a "NOTICE" text file as part of its
114
+ distribution, then any Derivative Works that You distribute must
115
+ include a readable copy of the attribution notices contained
116
+ within such NOTICE file, excluding those notices that do not
117
+ pertain to any part of the Derivative Works, in at least one
118
+ of the following places: within a NOTICE text file distributed
119
+ as part of the Derivative Works; within the Source form or
120
+ documentation, if provided along with the Derivative Works; or,
121
+ within a display generated by the Derivative Works, if and
122
+ wherever such third-party notices normally appear. The contents
123
+ of the NOTICE file are for informational purposes only and
124
+ do not modify the License. You may add Your own attribution
125
+ notices within Derivative Works that You distribute, alongside
126
+ or as an addendum to the NOTICE text from the Work, provided
127
+ that such additional attribution notices cannot be construed
128
+ as modifying the License.
129
+
130
+ You may add Your own copyright statement to Your modifications and
131
+ may provide additional or different license terms and conditions
132
+ for use, reproduction, or distribution of Your modifications, or
133
+ for any such Derivative Works as a whole, provided Your use,
134
+ reproduction, and distribution of the Work otherwise complies with
135
+ the conditions stated in this License.
136
+
137
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
138
+ any Contribution intentionally submitted for inclusion in the Work
139
+ by You to the Licensor shall be under the terms and conditions of
140
+ this License, without any additional terms or conditions.
141
+ Notwithstanding the above, nothing herein shall supersede or modify
142
+ the terms of any separate license agreement you may have executed
143
+ with Licensor regarding such Contributions.
144
+
145
+ 6. Trademarks. This License does not grant permission to use the trade
146
+ names, trademarks, service marks, or product names of the Licensor,
147
+ except as required for reasonable and customary use in describing the
148
+ origin of the Work and reproducing the content of the NOTICE file.
149
+
150
+ 7. Disclaimer of Warranty. Unless required by applicable law or
151
+ agreed to in writing, Licensor provides the Work (and each
152
+ Contributor provides its Contributions) on an "AS IS" BASIS,
153
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
154
+ implied, including, without limitation, any warranties or conditions
155
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
156
+ PARTICULAR PURPOSE. You are solely responsible for determining the
157
+ appropriateness of using or redistributing the Work and assume any
158
+ risks associated with Your exercise of permissions under this License.
159
+
160
+ 8. Limitation of Liability. In no event and under no legal theory,
161
+ whether in tort (including negligence), contract, or otherwise,
162
+ unless required by applicable law (such as deliberate and grossly
163
+ negligent acts) or agreed to in writing, shall any Contributor be
164
+ liable to You for damages, including any direct, indirect, special,
165
+ incidental, or consequential damages of any character arising as a
166
+ result of this License or out of the use or inability to use the
167
+ Work (including but not limited to damages for loss of goodwill,
168
+ work stoppage, computer failure or malfunction, or any and all
169
+ other commercial damages or losses), even if such Contributor
170
+ has been advised of the possibility of such damages.
171
+
172
+ 9. Accepting Warranty or Additional Liability. While redistributing
173
+ the Work or Derivative Works thereof, You may choose to offer,
174
+ and charge a fee for, acceptance of support, warranty, indemnity,
175
+ or other liability obligations and/or rights consistent with this
176
+ License. However, in accepting such obligations, You may act only
177
+ on Your own behalf and on Your sole responsibility, not on behalf
178
+ of any other Contributor, and only if You agree to indemnify,
179
+ defend, and hold each Contributor harmless for any liability
180
+ incurred by, or claims asserted against, such Contributor by reason
181
+ of your accepting any such warranty or additional liability.
182
+
183
+ END OF TERMS AND CONDITIONS
184
+
185
+ APPENDIX: How to apply the Apache License to your work.
186
+
187
+ To apply the Apache License to your work, attach the following
188
+ boilerplate notice, with the fields enclosed by brackets "[]"
189
+ replaced with your own identifying information. (Don't include
190
+ the brackets!) The text should be enclosed in the appropriate
191
+ comment syntax for the file format. We also recommend that a
192
+ file or class name and description of purpose be included on the
193
+ same "printed page" as the copyright notice for easier
194
+ identification within third-party archives.
195
+
196
+ Copyright 2025 OpenAI
197
+
198
+ Licensed under the Apache License, Version 2.0 (the "License");
199
+ you may not use this file except in compliance with the License.
200
+ You may obtain a copy of the License at
201
+
202
+ http://www.apache.org/licenses/LICENSE-2.0
203
+
204
+ Unless required by applicable law or agreed to in writing, software
205
+ distributed under the License is distributed on an "AS IS" BASIS,
206
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
207
+ See the License for the specific language governing permissions and
208
+ limitations under the License.
209
+ Project-URL: Homepage, https://github.com/synapsai-cloud/synapsai-python
210
+ Classifier: Programming Language :: Python :: 3
211
+ Classifier: Operating System :: OS Independent
212
+ Requires-Python: >=3.8
213
+ Description-Content-Type: text/markdown
214
+ License-File: LICENSE
215
+ Requires-Dist: httpx>=0.23.0
216
+ Requires-Dist: pydantic<3,>=2.0
217
+ Requires-Dist: typing-extensions>=4.5
218
+ Requires-Dist: Pillow>=9.5.0
219
+ Dynamic: author
220
+ Dynamic: home-page
221
+ Dynamic: license-file
222
+ Dynamic: requires-python
223
+
224
+ # SynapsAI Python SDK
225
+
226
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
227
+ [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/)
228
+
229
+ The official SynapsAI Cloud AI inference Python SDK. Seamlessly integrate multi-modal AI capabilities into your applications.
230
+
231
+ ---
232
+
233
+ ## Installation
234
+
235
+ Install the latest version of the SDK:
236
+
237
+ ```bash
238
+ pip install --upgrade synapsai-python
239
+ ```
240
+
241
+ ### Requirements
242
+
243
+ * Python >= 3.8
244
+ * `httpx` >= 0.23.0, < 1.0.0
245
+ * `pydantic` >= 2.0, < 3
246
+ * `typing-extensions` >= 4.5, < 5
247
+ * `Pillow` >= 9.5.0, < 11
248
+ * `numpy` >= 1.21.0, < 2
249
+
250
+ ---
251
+
252
+ ## Quick Start
253
+
254
+ ### 1. Setup Environment Variables
255
+
256
+ You can configure the SDK using environment variables instead of hardcoding your credentials:
257
+
258
+ * `SYNAPSAI_API_KEY` - Your SynapsAI API key
259
+ * `SYNAPSAI_API_BASE` - Custom base URL (Defaults to `https://api.synapsai.cloud/v1`)
260
+
261
+ ### 2. Initialization & Example Usage
262
+
263
+ Here is how to initialize the client and fetch a list of all deployed models on your account:
264
+
265
+ ```python
266
+ import os
267
+ from synapsai import SynapsAI
268
+
269
+ # Initialize the client (picks up env variables automatically if arguments are omitted)
270
+ client = SynapsAI(
271
+ api_key=os.environ.get("SYNAPSAI_API_KEY"),
272
+ )
273
+
274
+ # Fetch and view deployed models
275
+ models_page = client.models.list()
276
+ for model in models_page.data:
277
+ print(f"Model ID: {model.id} | Status: {model.status}")
278
+
279
+ ```
280
+
281
+ ---
282
+
283
+ ## Documentation
284
+
285
+ For advanced configurations, deep-dive usage guides, and comprehensive code examples for every resource, visit our [Examples Documentation](https://docs.synapsai.cloud/examples/introduction).
286
+
287
+ ---
288
+
289
+ ## Available Resources
290
+
291
+ The SDK provides native support for the following SynapsAI Cloud capabilities:
292
+
293
+ | Resource | Description |
294
+ | --- | --- |
295
+ | **`models`** | Model management and discovery |
296
+ | **`chat.completions`** | Chat completions and real-time streaming |
297
+ | **`completions`** | Classic text completions |
298
+ | **`embeddings`** | Text embeddings generation |
299
+ | **`images`** | Image generation and manipulation |
300
+ | **`audio`** | Speech-to-text and text-to-speech processing |
301
+ | **`videos`** | Video generation and processing |
302
+ | **`classifications`** | Text classification tasks |
303
+ | **`question_answering`** | Targeted question answering |
304
+ | **`feature_extraction`** | Feature extraction pipelines |
305
+ | **`fill_mask`** | Masked Language Modeling (MLM) |
306
+ | **`rerank`** | Text reranking for search optimization |
307
+
308
+ ---
309
+
310
+ ## License
311
+
312
+ This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
@@ -0,0 +1,37 @@
1
+ synapsai/__init__.py,sha256=ZieAxEiPjGl4NURgPRMrlBMb-NsYst0L7b5Qvuxk2hg,365
2
+ synapsai/client.py,sha256=1lKwycWmK-n6gizlwg8Nj9DiCmCImkYEsZHcmQSC3mI,23579
3
+ synapsai/exceptions.py,sha256=j6_qwty-0AgQmV1phezYEgAtMLQusMmj9AFsmWgMzNM,1716
4
+ synapsai/logging.py,sha256=XateKRutYM8VZLlfnvsDTe8s9F2XKDEfVHManFY3lEs,2137
5
+ synapsai/processing.py,sha256=NBRF5ugDeQS0mSdkNP8SjdlT3UTXHsyiHPSPPzNG6c8,3496
6
+ synapsai/utils.py,sha256=hr9VZF6QrLYWjHf5in0lCJQWJX70zAwrkkBHVn7TN2w,983
7
+ synapsai/resources/__init__.py,sha256=kZoA6wKkmeQBs-La5UZNIi0YO7a8sToMSRboYd1rpfU,2286
8
+ synapsai/resources/audio.py,sha256=AavICwnnqHDVEaD-N3ihZy95CLsyVUiD9t3j3j_Mi6c,16940
9
+ synapsai/resources/chat.py,sha256=EJWTa_9-TyX5C8VhRnE16TnsN8H3szVKl8uf7ZYOx0s,6757
10
+ synapsai/resources/classifications.py,sha256=mw_KXUEnV6cJymgJm3Mldk40_TkjYFC0YSrGSZwXOhE,15304
11
+ synapsai/resources/completions.py,sha256=LCAIS0itv5c_HOUYzxd97PGaNoTRQqKYoAUskew92yc,5200
12
+ synapsai/resources/embeddings.py,sha256=pKslRVyaySfgByG6aa3OosBGrQodzDkbO7_PJtLwtYA,6928
13
+ synapsai/resources/feature_extraction.py,sha256=-KyIconKnz1R8jTBQCq9M8Zfss6erxepZ3--L9xD9hM,2483
14
+ synapsai/resources/fill_mask.py,sha256=XNJYt0Y-KSORAOLqFrWlvWQ9ckCMGybeHsDMnN1hCKE,2654
15
+ synapsai/resources/images.py,sha256=Vn-L47-N9c42qyj6-5aWaW0BGJrZHUQuYwSPPj_AJL4,17903
16
+ synapsai/resources/models.py,sha256=jL9cWo7SVfiDQMtPEq7fgHHQVWEILFOABLTViRFCWbU,2286
17
+ synapsai/resources/question_answering.py,sha256=N_FfD2TyOVsaloYuuZF55jeis-dPhgUNvASfr_5R-0c,9292
18
+ synapsai/resources/rerank.py,sha256=Fmu7siu_NNmFHqMVek-FrqVmaRchMMc7Ykxl0iwzNgc,2561
19
+ synapsai/resources/videos.py,sha256=UHD1_ACiaOgOAcUqLWpd8p8wX2goJrUs1q1pJjN9_vo,10581
20
+ synapsai/types/__init__.py,sha256=oEma9XooE1JMRKSETM7zRHIsux24COpn1iYeXrY9YxA,3720
21
+ synapsai/types/audio.py,sha256=csbAx9URuEn-u6nkwQ68eJSSXeJq5lcV_FPqMIcVifQ,5700
22
+ synapsai/types/classifications.py,sha256=iIZB3KELAKk7vtWOstPIycOaDHw86HfQnojLCBPe2nE,10907
23
+ synapsai/types/common.py,sha256=3a0js8haxnvWPER8g1XYsyyXSCTKtMIXR-q8IaGxWKI,1591
24
+ synapsai/types/completion.py,sha256=YtXAzMAnH5EkbEfhuszieSD91xcEJax8kotnfK-5S98,7023
25
+ synapsai/types/embeddings.py,sha256=SuEIL6reMUKKs0Bj0_w7xl-dhhois8i3ZSn_mbMaAY0,2185
26
+ synapsai/types/feature_extraction.py,sha256=ZXH8g3B3SlKfgQwGRqIQEnQqV8UHfLxt8BKTVH3PAlA,1053
27
+ synapsai/types/fill_mask.py,sha256=ohHmsHQkpwcJ7TANJWRQZ79VLJKC3bTYHDbWNyef4HM,1203
28
+ synapsai/types/images.py,sha256=JTx4GtzOodyf1GOos3gx7va8nuqQQV7zIfs6RBdGe2k,5986
29
+ synapsai/types/models.py,sha256=PGi4Rx1E38vBErvYFRuuArXGr2m2Q-XpZmaUV0ZUtEA,943
30
+ synapsai/types/question_answering.py,sha256=pdqdWnNSVr5NkEvhTB6YA4sDf13YCKUqB5Lcj7PyORA,6525
31
+ synapsai/types/rerank.py,sha256=FvXgxBu59y82BGCppp58ZsbeD1os_-z0tfx7SHjInNk,1082
32
+ synapsai/types/videos.py,sha256=gMNd_FtKRY4WcgUw9AW5xH-ec4mILoe6PM8O48KdOmE,2488
33
+ synapsai_python-0.1.0.dist-info/licenses/LICENSE,sha256=BUK27px1XMdZg-lWd-PA4IJvtzEv7dtDzfCTpb8ylRA,11535
34
+ synapsai_python-0.1.0.dist-info/METADATA,sha256=9X0-0_qLVzwvVP0dlOnYfeoRAnJmnYZs2QQBVzIQSEo,16568
35
+ synapsai_python-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
36
+ synapsai_python-0.1.0.dist-info/top_level.txt,sha256=0xdntUcMsdcJi14DZ5M1-N2gvigGhkSHBqNG9fvhz7s,9
37
+ synapsai_python-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+