socaity-schemas
Shared Pydantic models for APIPod services and their clients. One definition, used on both sides of the wire, so a service and a client never drift apart on field names or shapes.
The groups:
media_files:FileModeland its typed variants (ImageFileModel,AudioFileModel,VideoFileModel,ThreeDFileModel). The wire shape of a media-toolkit file: name, content type, and content as base64 or URL.schemas: OpenAI-compatible request and response models (chat, completion, embedding, image, video, audio, vision, 3D) plus streaming chunks (ChatCompletionChunk).transport: provider job envelopes (SocaityJobResponse,RunpodJobResponse,ReplicateJobResponse), their link/metric sub-models, and theStreamingResponsesentinel.contract: the machine-readable interface of a deployed service (ServiceContract,Endpoint, parameter models,ServiceAddressvariants).contract.specificationsays how the spec is written (openapi, apipod, cog); it says nothing about where the service runs.platform: the socaity catalog domain.AIServiceis the aggregate root, withDeployment(provider, region, address, contract revision) andAIModel(organization, weights, capabilities, license, benchmark scores) as separate entities. Services and models relate many-to-many through endpoints.platform.workflowis the workflow IR (WorkflowDocument,Node,Edge, constants, annotations, companionWorkflowLayout). Mutations live insocaity-workflows.
from socaity_schemas import ChatCompletionRequest, ServiceContract, AIService, AIModel
from socaity_schemas.contract import RunpodServiceAddress
The schema shape mirrors the OpenAI API so OpenAI-compatible clients work without translation. That is about the wire format only: any provider (Flux, Whisper, ElevenLabs, in-house models) that matches the shape is a valid backend.
Install
pip install socaity-schemas
MIT-licensed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file socaity_schemas-0.1.6.tar.gz.
File metadata
- Download URL: socaity_schemas-0.1.6.tar.gz
- Upload date:
- Size: 45.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c3f8a383ad4390f0f50c96d2432395baa93c78f163c2db397da728cbe000445
|
|
| MD5 |
76e277a8f51aeeee507d728a231dcf29
|
|
| BLAKE2b-256 |
f125851ae8c232b879e0cf4a4c5a4eacfd014144f515a78ce97b98f61b9f5f81
|
File details
Details for the file socaity_schemas-0.1.6-py3-none-any.whl.
File metadata
- Download URL: socaity_schemas-0.1.6-py3-none-any.whl
- Upload date:
- Size: 54.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b0bf3ca52dd4912d1f00b99353261c169e815956d635d7e31f1b0405e8e0f4c
|
|
| MD5 |
595d99b2d31ebb020b12edeb989693ad
|
|
| BLAKE2b-256 |
f8197d6242f988e044aaf56d6c8adce844496d8f300989bcc741eff352b17a52
|