OpenAI Responses compatible
Responses
An OpenAI Responses compatible endpoint using input-based requests and streaming events. The gateway keeps no conversation state: fields such as previous_response_id and store are ignored, so send the full history in input for multi-turn conversations.
POST
/v1/responsesKey request parameters
| Parameter | Type | Description |
|---|---|---|
model | string · Required | Model identifier |
input | string | InputItem[] · Required | Plain text or structured input |
instructions | string | System instructions converted to a system message |
stream | boolean | Whether to enable SSE; defaults to false |
max_output_tokens | integer | Maximum number of output tokens |
Key response parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Response ID |
status | string | completed when the response finishes |
output | OutputItem[] | Model output items |
usage | object | Input, output, and total token counts |
X-HashBid-Cost | decimal string | Charge for this call (response header, non-streaming requests only); currency in X-HashBid-Cost-Currency |
Integration examples
Replace the API key and model ID in these examples with your values.
cURL
curl https://hashbidx.ai/v1/responses \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"model":"<MODEL_ID>","input":"Hello, HashBid"}'Python
from openai import OpenAI
client = OpenAI(api_key="<YOUR_API_KEY>", base_url="https://hashbidx.ai/v1")
response = client.responses.create(
model="<MODEL_ID>", input="Hello, HashBid"
)
print(response.output_text)Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "<YOUR_API_KEY>",
baseURL: "https://hashbidx.ai/v1",
});
const response = await client.responses.create({
model: "<MODEL_ID>",
input: "Hello, HashBid",
});
console.log(response.output_text);Go
body, _ := json.Marshal(map[string]any{
"model": "<MODEL_ID>",
"input": "Hello, HashBid",
})
req, _ := http.NewRequest("POST",
"https://hashbidx.ai/v1/responses", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer <YOUR_API_KEY>")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)Rust
let response = reqwest::Client::new()
.post("https://hashbidx.ai/v1/responses")
.bearer_auth("<YOUR_API_KEY>")
.json(&serde_json::json!({
"model": "<MODEL_ID>", "input": "Hello, HashBid"
}))
.send().await?;If the response includes X-Request-Id, include it when troubleshooting an issue.