Create a response (OpenAI Responses format)
curl --request POST \
--url https://api.primalabs.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "primalabs-ai/DeepSeek-V4.1-Flash-1017",
"input": "Hello"
}
'import requests
url = "https://api.primalabs.ai/v1/responses"
payload = {
"model": "primalabs-ai/DeepSeek-V4.1-Flash-1017",
"input": "Hello"
}
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: 'primalabs-ai/DeepSeek-V4.1-Flash-1017', input: 'Hello'})
};
fetch('https://api.primalabs.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.primalabs.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'primalabs-ai/DeepSeek-V4.1-Flash-1017',
'input' => 'Hello'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.primalabs.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"primalabs-ai/DeepSeek-V4.1-Flash-1017\",\n \"input\": \"Hello\"\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))
}HttpResponse<String> response = Unirest.post("https://api.primalabs.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"primalabs-ai/DeepSeek-V4.1-Flash-1017\",\n \"input\": \"Hello\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primalabs.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"primalabs-ai/DeepSeek-V4.1-Flash-1017\",\n \"input\": \"Hello\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"message": "Authentication Error, Invalid proxy server token passed.",
"type": "token_not_found_in_db",
"param": "key",
"code": "401"
}
}{
"error": {
"message": "key not allowed to access model. Tried to access primalabs-ai/does-not-exist",
"type": "key_model_access_denied",
"param": "model",
"code": "403"
}
}{
"error": {
"message": "ExceededBudget: User=<your user id> over budget. Spend=25.0, Budget=25.0",
"type": "budget_exceeded",
"code": "422"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Passthrough
Create a response (OpenAI Responses format)
Accepts the OpenAI Responses API request/response shape. Use this if your
client already speaks the Responses API. The request body is the
OpenAI Responses API’s.
Turn thinking off with "reasoning": {"effort": "none"}; this is the one switch
that works on every model (see Reasoning).
POST
/
responses
Create a response (OpenAI Responses format)
curl --request POST \
--url https://api.primalabs.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "primalabs-ai/DeepSeek-V4.1-Flash-1017",
"input": "Hello"
}
'import requests
url = "https://api.primalabs.ai/v1/responses"
payload = {
"model": "primalabs-ai/DeepSeek-V4.1-Flash-1017",
"input": "Hello"
}
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: 'primalabs-ai/DeepSeek-V4.1-Flash-1017', input: 'Hello'})
};
fetch('https://api.primalabs.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.primalabs.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'primalabs-ai/DeepSeek-V4.1-Flash-1017',
'input' => 'Hello'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.primalabs.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"primalabs-ai/DeepSeek-V4.1-Flash-1017\",\n \"input\": \"Hello\"\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))
}HttpResponse<String> response = Unirest.post("https://api.primalabs.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"primalabs-ai/DeepSeek-V4.1-Flash-1017\",\n \"input\": \"Hello\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primalabs.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"primalabs-ai/DeepSeek-V4.1-Flash-1017\",\n \"input\": \"Hello\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"message": "Authentication Error, Invalid proxy server token passed.",
"type": "token_not_found_in_db",
"param": "key",
"code": "401"
}
}{
"error": {
"message": "key not allowed to access model. Tried to access primalabs-ai/does-not-exist",
"type": "key_model_access_denied",
"param": "model",
"code": "403"
}
}{
"error": {
"message": "ExceededBudget: User=<your user id> over budget. Spend=25.0, Budget=25.0",
"type": "budget_exceeded",
"code": "422"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Authorizations
Body
application/json
Response
An OpenAI Responses-format response.
The response is of type object.