Skip to main content
POST
/
v1
/
completions
Create a text completion
curl --request POST \
  --url https://api.tera.gw/v1/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "Qwen/Qwen2.5-7B-Instruct",
  "prompt": "<string>",
  "max_tokens": 64,
  "temperature": 123,
  "top_p": 123,
  "top_k": 123,
  "stop": "<string>",
  "seed": 123,
  "stream": false
}
'
{
  "id": "<string>",
  "object": "text_completion",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "text": "<string>",
      "index": 123,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.tera.gw/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required
Example:

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

prompt
required
max_tokens
integer
Example:

64

temperature
number
top_p
number
top_k
integer
stop
seed
integer
stream
boolean
default:false

Response

A text completion (or an SSE stream when stream: true).

id
string
object
string
Example:

"text_completion"

created
integer
model
string
choices
object[]
usage
object