Skip to main content

Overview

Generate text responses from language models using the OpenAI-compatible chat completions API. Supports streaming, vision, audio, documents (PDFs), tool calling, and structured output.

Minimal Example

With Streaming

With a Document (PDF)

Attach a PDF with a file content part. Oxen.ai translates the document to each provider’s native format, so it works the same regardless of which model you call.

Reference a document by URL

You can also point at a PDF by URL (handy for files generated in a workspace):
The URL must be publicly accessible (and unexpired, if presigned). Only application/pdf is supported, and a document must be 24 MB or smaller; other inputs return a 400. See the reference for details.

What’s Next