Endpoint

Use /openai as the SDK base URL for SDKs that append resource paths such as /chat/completions:
If a tool expects the base URL to already include /v1, use:

Python

JavaScript

Supported Route Groups

ModRouter’s OpenAI integration includes:
  • chat completions
  • text completions
  • responses
  • embeddings
  • speech and transcription
  • image generation, edits, and variations
  • videos where configured
  • files
  • batches
  • containers and container files
  • model listing
  • selected Azure OpenAI deployment-path compatibility
  • selected realtime HTTP, WebSocket, and WebRTC routes
The integration converts supported OpenAI request shapes into ModRouter requests. It is not a blanket proxy for every OpenAI endpoint. Use Passthrough for provider-native paths not covered by the integration.

Custom Headers

Pass ModRouter-specific headers through the SDK when needed:

Async Inference

Integration routes support ModRouter’s async headers for inference requests when the async job store is configured:
Async is for inference routes, not file, batch, or container operations.