Skip to main content

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: FileModel and 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 the StreamingResponse sentinel.
  • contract: the machine-readable interface of a deployed service (ServiceContract, Endpoint, parameter models, ServiceAddress variants). contract.specification says how the spec is written (openapi, apipod, cog); it says nothing about where the service runs.
  • platform: the socaity catalog domain. AIService is the aggregate root, with Deployment (provider, region, address, contract revision) and AIModel (organization, weights, capabilities, license, benchmark scores) as separate entities. Services and models relate many-to-many through endpoints. platform.workflow is the workflow IR (WorkflowDocument, Node, Edge, constants, annotations, companion WorkflowLayout). Mutations live in socaity-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.

Metadata

Release files for socaity-schemas 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socaity-schemas 0.1.7
File Size Uploaded
socaity_schemas-0.1.7.tar.gz 45.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for socaity-schemas 0.1.7
File Interpreter ABI Platform
socaity_schemas-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 100.7 kB

Release files / socaity_schemas-0.1.7.tar.gz

Download URL socaity_schemas-0.1.7.tar.gz
Size 45.6 kB
Tags Source
SHA-256 checksum
How to use checksums
747151fffc4a79bbbe924192e0b94066891d49231fcfa2d9c5226be3f81a8de1
BLAKE2b-256 checksum
How to use checksums
8926b5c1214b9dce592fc07a6db9740666d8d2aef873e672d56845d55bcfc260
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / socaity_schemas-0.1.7-py3-none-any.whl

Download URL socaity_schemas-0.1.7-py3-none-any.whl
Size 55.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50d7d639cfa8452471c5eb20e03a537920cd5af14e6084ed95d20a9ab46d0a2e
BLAKE2b-256 checksum
How to use checksums
ba753e115419e05d0ffb736cf5ca825a7c67397ea84698064c84caadc58a6aca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

0.1.12

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page