curl --request POST \
--url https://flow.seekr.com/v1/inference/completions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "meta-llama/Llama-3.1-8B-Instruct",
"prompt": "The capital of France is",
"max_tokens": 32,
"temperature": 0.7,
"stream": false
}
'import requests
url = "https://flow.seekr.com/v1/inference/completions"
payload = {
"model": "meta-llama/Llama-3.1-8B-Instruct",
"prompt": "The capital of France is",
"max_tokens": 32,
"temperature": 0.7,
"stream": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'meta-llama/Llama-3.1-8B-Instruct',
prompt: 'The capital of France is',
max_tokens: 32,
temperature: 0.7,
stream: false
})
};
fetch('https://flow.seekr.com/v1/inference/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://flow.seekr.com/v1/inference/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' => 'meta-llama/Llama-3.1-8B-Instruct',
'prompt' => 'The capital of France is',
'max_tokens' => 32,
'temperature' => 0.7,
'stream' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://flow.seekr.com/v1/inference/completions"
payload := strings.NewReader("{\n \"model\": \"meta-llama/Llama-3.1-8B-Instruct\",\n \"prompt\": \"The capital of France is\",\n \"max_tokens\": 32,\n \"temperature\": 0.7,\n \"stream\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://flow.seekr.com/v1/inference/completions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"meta-llama/Llama-3.1-8B-Instruct\",\n \"prompt\": \"The capital of France is\",\n \"max_tokens\": 32,\n \"temperature\": 0.7,\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/inference/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"meta-llama/Llama-3.1-8B-Instruct\",\n \"prompt\": \"The capital of France is\",\n \"max_tokens\": 32,\n \"temperature\": 0.7,\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"text": "<string>",
"logprobs": {
"text_offset": [
123
],
"token_logprobs": [
123
],
"tokens": [
"<string>"
],
"top_logprobs": [
{}
]
},
"finish_reason": "<string>",
"stop_reason": 123,
"token_ids": [
123
],
"prompt_logprobs": [
{}
],
"prompt_token_ids": [
123
]
}
],
"usage": {
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 123,
"created_cache_tokens": 123,
"multimodal_tokens": {}
}
},
"object": "text_completion",
"service_tier": "auto",
"system_fingerprint": "<string>",
"kv_transfer_params": {},
"metrics": {
"time_to_first_token_ms": 123,
"generation_time_ms": 123,
"queue_time_ms": 123,
"mean_itl_ms": 123,
"tokens_per_second": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}Create completion
Generate a text completion response from a deployed model.
curl --request POST \
--url https://flow.seekr.com/v1/inference/completions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "meta-llama/Llama-3.1-8B-Instruct",
"prompt": "The capital of France is",
"max_tokens": 32,
"temperature": 0.7,
"stream": false
}
'import requests
url = "https://flow.seekr.com/v1/inference/completions"
payload = {
"model": "meta-llama/Llama-3.1-8B-Instruct",
"prompt": "The capital of France is",
"max_tokens": 32,
"temperature": 0.7,
"stream": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'meta-llama/Llama-3.1-8B-Instruct',
prompt: 'The capital of France is',
max_tokens: 32,
temperature: 0.7,
stream: false
})
};
fetch('https://flow.seekr.com/v1/inference/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://flow.seekr.com/v1/inference/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' => 'meta-llama/Llama-3.1-8B-Instruct',
'prompt' => 'The capital of France is',
'max_tokens' => 32,
'temperature' => 0.7,
'stream' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://flow.seekr.com/v1/inference/completions"
payload := strings.NewReader("{\n \"model\": \"meta-llama/Llama-3.1-8B-Instruct\",\n \"prompt\": \"The capital of France is\",\n \"max_tokens\": 32,\n \"temperature\": 0.7,\n \"stream\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://flow.seekr.com/v1/inference/completions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"meta-llama/Llama-3.1-8B-Instruct\",\n \"prompt\": \"The capital of France is\",\n \"max_tokens\": 32,\n \"temperature\": 0.7,\n \"stream\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/inference/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"meta-llama/Llama-3.1-8B-Instruct\",\n \"prompt\": \"The capital of France is\",\n \"max_tokens\": 32,\n \"temperature\": 0.7,\n \"stream\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"text": "<string>",
"logprobs": {
"text_offset": [
123
],
"token_logprobs": [
123
],
"tokens": [
"<string>"
],
"top_logprobs": [
{}
]
},
"finish_reason": "<string>",
"stop_reason": 123,
"token_ids": [
123
],
"prompt_logprobs": [
{}
],
"prompt_token_ids": [
123
]
}
],
"usage": {
"prompt_tokens": 0,
"total_tokens": 0,
"completion_tokens": 0,
"prompt_tokens_details": {
"cached_tokens": 123,
"created_cache_tokens": 123,
"multimodal_tokens": {}
}
},
"object": "text_completion",
"service_tier": "auto",
"system_fingerprint": "<string>",
"kv_transfer_params": {},
"metrics": {
"time_to_first_token_ms": 123,
"generation_time_ms": 123,
"queue_time_ms": 123,
"mean_itl_ms": 123,
"tokens_per_second": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"param": "<string>"
}
}Authorizations
Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
Body
x >= 0Show child attributes
Show child attributes
-9223372036854776000 <= x <= 9223372036854776000Show child attributes
Show child attributes
-1 <= x <= 9223372036854776000Which side to truncate from when truncate_prompt_tokens is active. 'right' keeps the first N tokens. 'left' keeps the last N tokens.
left, right Specific vocab token IDs to return logprobs for at each generated position, in addition to the sampled token. Requires logprobs to be set.
If true (the default), special tokens (e.g. BOS) will be added to the prompt.
Similar to chat completion, this parameter specifies the format of output. Only {'type': 'json_object'}, {'type': 'json_schema'}, {'type': 'structural_tag'}, or {'type': 'text'} is supported.
- ResponseFormat
- StructuralTagResponseFormat
- LegacyStructuralTagResponseFormat
Show child attributes
Show child attributes
Additional kwargs for structured outputs
Show child attributes
Show child attributes
The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.
-9223372036854776000 <= x <= 9223372036854776000The request_id related to this request. If the caller does not set it, a random uuid will be generated.
If specified with 'logprobs', tokens are represented as strings of the form 'token_id:{token_id}' so that tokens that are not JSON-encodable can be identified.
If specified, the result will include token IDs alongside the generated text.
If specified, the prefix cache will be salted with the provided string to prevent an attacker from guessing prompts in multi-user environments.
KVTransfer parameters used for disaggregated serving.
Additional request parameters with (list of) string or numeric values, used by custom extensions.
Show child attributes
Show child attributes
Parameters for detecting repetitive N-gram patterns in output tokens. If such repetition is detected, generation ends early.
Show child attributes
Show child attributes
Maximum number of tokens allowed for thinking operations (reasoning models). Non-negative integer sets the limit; -1 means unlimited (treated as unset).
Response
Successful response.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"text_completion"auto, default, flex, scale, priority Show child attributes
Show child attributes
Was this page helpful?