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.8

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.8
File Size Uploaded
socaity_schemas-0.1.8.tar.gz 45.6 kB Details

Built distribution (wheel)

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

Total release size: 100.7 kB

Release files / socaity_schemas-0.1.8.tar.gz

Download URL socaity_schemas-0.1.8.tar.gz
Size 45.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1a32911d96e8a029b5a24103e47f53ca9c8c000c93e4b88ea607a75855cff072
BLAKE2b-256 checksum
How to use checksums
db42ff4ce2928464e82c6b51269e12c8a4d5a97c81094215a7058f5a395c6527
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.8-py3-none-any.whl

Download URL socaity_schemas-0.1.8-py3-none-any.whl
Size 55.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89164ca8d4ec84d00b41149519d6e1c8ec5f89a8ccedc7933a8769bfa2cfc779
BLAKE2b-256 checksum
How to use checksums
c070e317f8cfbd886972bab1ae1ba8ef53d1c31e5956997594f2ac1ffb14cff3
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.11

2 release files

0.1.9

2 release files

This release

0.1.8 This release

2 release files

0.1.7

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