curl --request POST \
--url https://platform.jobbit.uk/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "jobbit/pro",
"messages": [
{
"role": "system",
"content": "You write short, friendly replies for Kent Physio."
},
{
"role": "user",
"content": "Confirm Priya's Tuesday 10am session in one sentence."
}
],
"max_tokens": 80
}
EOFimport requests
url = "https://platform.jobbit.uk/v1/chat/completions"
payload = {
"model": "jobbit/pro",
"messages": [
{
"role": "system",
"content": "You write short, friendly replies for Kent Physio."
},
{
"role": "user",
"content": "Confirm Priya's Tuesday 10am session in one sentence."
}
],
"max_tokens": 80
}
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: 'jobbit/pro',
messages: [
{role: 'system', content: 'You write short, friendly replies for Kent Physio.'},
{
role: 'user',
content: 'Confirm Priya\'s Tuesday 10am session in one sentence.'
}
],
max_tokens: 80
})
};
fetch('https://platform.jobbit.uk/v1/chat/completions', 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://platform.jobbit.uk/v1/chat/completions",
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' => 'jobbit/pro',
'messages' => [
[
'role' => 'system',
'content' => 'You write short, friendly replies for Kent Physio.'
],
[
'role' => 'user',
'content' => 'Confirm Priya\'s Tuesday 10am session in one sentence.'
]
],
'max_tokens' => 80
]),
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://platform.jobbit.uk/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"jobbit/pro\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You write short, friendly replies for Kent Physio.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Confirm Priya's Tuesday 10am session in one sentence.\"\n }\n ],\n \"max_tokens\": 80\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://platform.jobbit.uk/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"jobbit/pro\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You write short, friendly replies for Kent Physio.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Confirm Priya's Tuesday 10am session in one sentence.\"\n }\n ],\n \"max_tokens\": 80\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/chat/completions")
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\": \"jobbit/pro\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You write short, friendly replies for Kent Physio.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Confirm Priya's Tuesday 10am session in one sentence.\"\n }\n ],\n \"max_tokens\": 80\n}"
response = http.request(request)
puts response.read_body{
"id": "gen-1730822531-AbC",
"object": "chat.completion",
"created": 1730822531,
"model": "jobbit/pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hi Priya, your session at Kent Physio is confirmed for Tuesday at 10am."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 41,
"completion_tokens": 19,
"total_tokens": 60,
"cost": 0.00007
}
}{
"error": {
"code": "model_required",
"message": "name the model to use",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_credits",
"message": "not enough credits to run this request",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_scope",
"message": "this key does not have the deploy:write permission",
"details": {
"required": "deploy:write"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "payload_too_large",
"message": "the request body is larger than 26214400 bytes",
"details": {
"limit_bytes": 26214400
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "rate_limited",
"message": "too many read requests, retry in 4 s",
"details": {
"group": "read",
"limit": 120,
"window_seconds": 60
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "upstream_unavailable",
"message": "the inference service is unavailable, try again shortly",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}Create a chat completion
OpenAI-compatible chat. Set stream to true to receive server-sent events; the final chunk carries token usage and cost, and otherwise the credits spent come back in the X-Jobbit-Credits header. Chat also draws on the account’s tokens-per-minute budget, shown in GET /v1/plan. The body may be up to 25 MiB (gzip allowed), and a key limited to some models may only call those models.
Requires the ai permission.
curl --request POST \
--url https://platform.jobbit.uk/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "jobbit/pro",
"messages": [
{
"role": "system",
"content": "You write short, friendly replies for Kent Physio."
},
{
"role": "user",
"content": "Confirm Priya's Tuesday 10am session in one sentence."
}
],
"max_tokens": 80
}
EOFimport requests
url = "https://platform.jobbit.uk/v1/chat/completions"
payload = {
"model": "jobbit/pro",
"messages": [
{
"role": "system",
"content": "You write short, friendly replies for Kent Physio."
},
{
"role": "user",
"content": "Confirm Priya's Tuesday 10am session in one sentence."
}
],
"max_tokens": 80
}
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: 'jobbit/pro',
messages: [
{role: 'system', content: 'You write short, friendly replies for Kent Physio.'},
{
role: 'user',
content: 'Confirm Priya\'s Tuesday 10am session in one sentence.'
}
],
max_tokens: 80
})
};
fetch('https://platform.jobbit.uk/v1/chat/completions', 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://platform.jobbit.uk/v1/chat/completions",
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' => 'jobbit/pro',
'messages' => [
[
'role' => 'system',
'content' => 'You write short, friendly replies for Kent Physio.'
],
[
'role' => 'user',
'content' => 'Confirm Priya\'s Tuesday 10am session in one sentence.'
]
],
'max_tokens' => 80
]),
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://platform.jobbit.uk/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"jobbit/pro\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You write short, friendly replies for Kent Physio.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Confirm Priya's Tuesday 10am session in one sentence.\"\n }\n ],\n \"max_tokens\": 80\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://platform.jobbit.uk/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"jobbit/pro\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You write short, friendly replies for Kent Physio.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Confirm Priya's Tuesday 10am session in one sentence.\"\n }\n ],\n \"max_tokens\": 80\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/chat/completions")
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\": \"jobbit/pro\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You write short, friendly replies for Kent Physio.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Confirm Priya's Tuesday 10am session in one sentence.\"\n }\n ],\n \"max_tokens\": 80\n}"
response = http.request(request)
puts response.read_body{
"id": "gen-1730822531-AbC",
"object": "chat.completion",
"created": 1730822531,
"model": "jobbit/pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hi Priya, your session at Kent Physio is confirmed for Tuesday at 10am."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 41,
"completion_tokens": 19,
"total_tokens": 60,
"cost": 0.00007
}
}{
"error": {
"code": "model_required",
"message": "name the model to use",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_credits",
"message": "not enough credits to run this request",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_scope",
"message": "this key does not have the deploy:write permission",
"details": {
"required": "deploy:write"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "payload_too_large",
"message": "the request body is larger than 26214400 bytes",
"details": {
"limit_bytes": 26214400
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "rate_limited",
"message": "too many read requests, retry in 4 s",
"details": {
"group": "read",
"limit": 120,
"window_seconds": 60
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "upstream_unavailable",
"message": "the inference service is unavailable, try again shortly",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}Authorizations
An API key from Settings → API keys, sent as Authorization: Bearer jb_live_…
Body
An OpenAI-compatible chat request. Parameters not listed here are passed through to the model.
The model id from GET /v1/models, such as jobbit/pro.
200The conversation so far.
Show child attributes
Show child attributes
Stream the answer as server-sent events. The last chunk carries usage with the cost.
Sampling temperature.
Nucleus sampling.
The most tokens to generate.
A stop string or a list of them.
Tool definitions in the OpenAI format.
Which tool to call, in the OpenAI format.
Ask for JSON output, as in the OpenAI API.
How hard the model thinks. It is turned into reasoning.effort for the model.
Output modalities such as text and audio.
Response
The completion, or a text/event-stream of chunks when stream is true.