Skip to main content
POST
Create a completion

Authorizations

Authorization
string
header
required

Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.

Body

application/json
model
string | null
prompt
Required range: x >= 0
echo
boolean | null
default:false
frequency_penalty
number | null
default:0
logit_bias
Logit Bias · object | null
logprobs
integer | null
max_tokens
integer | null
default:16
n
integer
default:1
presence_penalty
number | null
default:0
seed
integer | null
Required range: -9223372036854776000 <= x <= 9223372036854776000
stop
default:[]
stream
boolean | null
default:false
stream_options
StreamOptions · object | null
suffix
string | null
temperature
number | null
top_p
number | null
user
string | null
top_k
integer | null
min_p
number | null
repetition_penalty
number | null
length_penalty
number
default:1
stop_token_ids
integer[] | null
include_stop_str_in_output
boolean
default:false
ignore_eos
boolean
default:false
min_tokens
integer
default:0
skip_special_tokens
boolean
default:true
spaces_between_special_tokens
boolean
default:true
truncate_prompt_tokens
integer | null
Required range: -1 <= x <= 9223372036854776000
truncation_side
enum<string> | null

Which side to truncate from when truncate_prompt_tokens is active. 'right' keeps the first N tokens. 'left' keeps the last N tokens.

Available options:
left,
right
allowed_token_ids
integer[] | null
prompt_logprobs
integer | null
logprob_token_ids
integer[] | null

Specific vocab token IDs to return logprobs for at each generated position, in addition to the sampled token. Requires logprobs to be set.

bad_words
string[]
add_special_tokens
boolean
default:true

If true (the default), special tokens (e.g. BOS) will be added to the prompt.

response_format
ResponseFormat · object

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.

structured_outputs
StructuredOutputsParams · object | null

Additional kwargs for structured outputs

priority
integer
default:0

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.

Required range: -9223372036854776000 <= x <= 9223372036854776000
request_id
string | null

The request_id related to this request. If the caller does not set it, a random uuid will be generated.

return_tokens_as_token_ids
boolean | null

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.

return_token_ids
boolean | null

If specified, the result will include token IDs alongside the generated text.

cache_salt
string | null

If specified, the prefix cache will be salted with the provided string to prevent an attacker from guessing prompts in multi-user environments.

kv_transfer_params
Kv Transfer Params · object | null

KVTransfer parameters used for disaggregated serving.

vllm_xargs
Vllm Xargs · object | null

Additional request parameters with (list of) string or numeric values, used by custom extensions.

repetition_detection
RepetitionDetectionParams · object | null

Parameters for detecting repetitive N-gram patterns in output tokens. If such repetition is detected, generation ends early.

thinking_token_budget
integer | null

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.

id
string
required
created
integer
required
model
string
required
choices
CompletionResponseChoice · object[]
required
usage
UsageInfo · object
required
object
string
default:text_completion
Allowed value: "text_completion"
service_tier
enum<string> | null
Available options:
auto,
default,
flex,
scale,
priority
system_fingerprint
string | null
kv_transfer_params
Kv Transfer Params · object | null
metrics
PerRequestTimingMetrics · object | null
Last modified on July 31, 2026