Create a response
curl --request POST \
--url https://api.pipellm.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": {}
}
'import requests
url = "https://api.pipellm.ai/v1/responses"
payload = {
"model": "<string>",
"input": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', input: {}})
};
fetch('https://api.pipellm.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pipellm.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Create a response
Create a model response with the OpenAI Responses API.
POST
/
v1
/
responses
Create a response
curl --request POST \
--url https://api.pipellm.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": {}
}
'import requests
url = "https://api.pipellm.ai/v1/responses"
payload = {
"model": "<string>",
"input": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', input: {}})
};
fetch('https://api.pipellm.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pipellm.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}For authentication and model list, see Overview.
Endpoint
POST https://api.pipellm.ai/v1/responses
This free route accepts OpenAI Responses requests and routes only to
OpenAI-compatible platforms. To call Anthropic or Gemini models with the
Responses format, use the
Responses Format Converter. The converter is
stateless and does not support
previous_response_id, stored responses,
hosted tools, or structured output formats.Code Examples
- cURL
- Python
- TypeScript
curl https://api.pipellm.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $PIPELLM_API_KEY" \
-d '{
"model": "gpt-5",
"input": "Write a one-sentence explanation of why the sky is blue."
}'
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("PIPELLM_API_KEY"),
base_url="https://api.pipellm.ai/v1"
)
response = client.responses.create(
model="gpt-5",
input="Write a one-sentence explanation of why the sky is blue."
)
print(response.output_text)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.PIPELLM_API_KEY,
baseURL: "https://api.pipellm.ai/v1",
});
const response = await client.responses.create({
model: "gpt-5",
input: "Write a one-sentence explanation of why the sky is blue.",
});
console.log(response.output_text);
Request Parameters
string
required
OpenAI-compatible model ID from
GET /v1/models.string | array
required
Text or structured input items.
string
Developer or system instruction.
boolean
If
true, stream the response.array
Built-in or custom tools.
number
Sampling temperature.
integer
Maximum output tokens.
Response Shape
{
"id": "resp_123",
"object": "response",
"model": "gpt-5",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The atmosphere scatters blue light more strongly than red light."
}
]
}
]
}
Related Docs
Routing & Protocols
Understand native route constraints
OpenAI Overview
OpenAI-compatible endpoints on PipeLLM
OpenAI Migration Guide
Official guidance on Responses vs Chat Completions
Was this page helpful?