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

socaity_schemas-0.1.4.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socaity_schemas-0.1.4-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file socaity_schemas-0.1.4.tar.gz.

File metadata

  • Download URL: socaity_schemas-0.1.4.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for socaity_schemas-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2ee33c1ef4cbeb3e2ac317970097858b8ad6c8d724ef2feac891b42950fd907f
MD5 4466094a22ca43a35ab120c771a3af66
BLAKE2b-256 64bbee34ac2d2bab5e1a99cce19f73b69bff2032018b65a78ad4dd5df0d8993a

See more details on using hashes here.

File details

Details for the file socaity_schemas-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for socaity_schemas-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 db4cd8d0e1915ea59ae03b126a44879d0539e28daa96927bf8a272f0e36e62e0
MD5 49554c8b4c08883fcd5c1b7cbc5e6e35
BLAKE2b-256 953738fa33cade5c436ea26b7644b21862f8edb3aa7a82b031e6082bf0a01d73

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.6

2 files

0.1.5

2 files

This release

0.1.4 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.0.1

2 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