singularity-grid is the official Python client for SGL Grid. Submit inference to TEE-verified nodes, check capacity, read pricing, and verify attestation — from one package.
Install
Quick start
Configuration
Submit a job + verify attestation
OpenAI-compatible usage
Vision (image input)
Send an image to a vision model (e.g.qwen2.5-vl-3b) by giving a message a list of
content parts — a text part and an image_url part (a data URL or an https URL). The image
is sealed end-to-end with the rest of your prompt; only the image count is disclosed so the
grid can quote it and route to a vision-capable node. Image requests are non-streaming.
Embeddings
Turn text into vectors for search and RAG via the OpenAI-compatible/v1/embeddings
endpoint. embed() returns the list of vectors (ordered to match input); embeddings()
returns the full OpenAI-style response. See the Embeddings guide
for the model catalog and options.
