OpenAI SDK provides the most robust integration method for accessing multiple model providers. Since most AI providers prioritize OpenAI SDK compatibility, you can seamlessly call all 250+ models available through the Respan platform gateway.
A variable in one prompt can reference another prompt. The child prompt is rendered first and injected into the parent. See Prompt composition for setup details.
The prompt object supports a schema_version field that controls how prompt configuration and request parameters are merged. See the full guide for details.
Prompt schema v1 (default, legacy): override flag controls which side wins for conflicts.
Prompt schema v2 (recommended, schema_version=2): prompt config always wins. Supports a patch field for non-message parameter overrides.
OpenAI SDKs strip fields like schema_version, patch, and prompt_slug during validation. Prompt schema v2 requires raw HTTP requests instead of the OpenAI SDK. See the Standard API examples.
The Responses API is OpenAI’s most advanced interface for generating model responses. It supports text and image inputs, text outputs, and stateful interactions using the output of previous responses as input. Extend the model’s capabilities with built-in tools for file search, web search, computer use, and more.
This works exclusively with OpenAI models and cannot be used with models from other providers.
Pass-through Integration Limitations: This is a pass-through integration. Some Respan features are not available, including:
User Rate Limits: You cannot enforce rate limits on your users.
Fallbacks: You cannot set up fallback models.
Load Balancing: You cannot distribute traffic across multiple models or credentials.
Prompt Management: You cannot use prompts stored in Respan directly.
Pass Respan parameters via a base64-encoded header:
response = client.responses.create( model="gpt-4o", input="Tell me a three sentence bedtime story about a unicorn.", extra_headers=respan_params_header,)print(response)
response = client.responses.create( model="gpt-4o", tools=[ { "type": "file_search", "vector_store_ids": ["vs_67d3bdd0c8888191adfa890a9e829480"], "max_num_results": 20, } ], input="What are the attributes of an ancient brown dragon?", extra_headers=respan_params_header,)
response = client.responses.create( model="o3-mini", input="How much wood would a woodchuck chuck?", reasoning={"effort": "high"}, extra_headers=respan_params_header,)print(response)
tools = [ { "type": "function", "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA", }, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location", "unit"], }, }]response = client.responses.create( model="gpt-4o", tools=tools, input="What is the weather like in Boston today?", tool_choice="auto", extra_headers=respan_params_header,)print(response)
To call Azure OpenAI models, instead of using azure OpenAI’s client, the easier way is to use the OpenAI client.
Copy
1. Go to [Respan Providers](https://platform.respan.ai/platform/api/providers)2. Add your Azure OpenAI credentials3. Configure your Azure deployment settings4. Use Azure models through the same Respan endpoint