Skip to main content
POST
Create Completion
Use this page when you want the serverless text-completions endpoint instead of chat completions.
  • Auth: Authorization: Bearer <API_KEY>
  • Host: https://serverless.tensormesh.ai
  • Model: pass a serverless model name in the JSON request body
If you need the OpenAI-style chat shape instead, use Serverless Chat Completions.

Authorizations

Authorization
string
header
required

Bearer authentication using your serverless API key. Format: Bearer <API_KEY>

Body

application/json
model
string
required

Serverless model name to use.

Example:

"openai/gpt-oss-20b"

prompt
required

Prompt text to complete.

max_tokens
integer | null

Response

Successful Response

id
string
required
Example:

"cmpl_123"

object
string
required
Example:

"text_completion"

created
integer
required
model
string
required
choices
TextCompletionChoice · object[]
required
usage
UsageInfo · object | null