Skip to main content
POST
/
v1
/
completions
Create a (legacy) text completion
curl --request POST \
  --url https://tokens.flex.ai/v1/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "Qwen/Qwen2.5-32B-Instruct",
  "prompt": "<string>",
  "max_tokens": 123,
  "temperature": 123,
  "stream": true
}
'
{}

Authorizations

Authorization
string
header
required

Virtual API key. Create one from the FlexAI dashboard. Pass as Authorization: Bearer sk-xxxx.

Body

application/json
model
string
required
Example:

"Qwen/Qwen2.5-32B-Instruct"

prompt
required
max_tokens
integer
temperature
number
stream
boolean

Response

Successful response

The response is of type object.