OpenAI SDKs
Prism’s chat, embeddings, and model-list endpoints use OpenAI-compatible request and response shapes. Set the SDK base URL to Prism and use your Prism API key. SetPRISM_MODEL to a chat-capable model before running the examples. The
Quickstart intersects the public trial allowlist with the
authenticated catalog and exports a model that the key can call. For paid or
organization keys, use a chat model approved for that key. Do not select a model
by position from /v1/models, because the catalog can include chat, embedding,
image, and video models.
Streaming
Setstream: true as you would with OpenAI:
Images and video
Image requests follow an OpenAI-style endpoint, but provider-specific image options may differ by model. Video is asynchronous and uses Prism’s/v1/video/generations job API. Use the HTTP examples in Images and
video for those modalities.
อ่านภาษาไทย