blocktool.js API (0.0.1)

Download OpenAPI specification:Download

API for language models

Generates completion for a given prompt

Request Body schema: application/json
frequency_penalty
number
max_tokens
required
integer

Maximum number of tokens to generate in the completion.

model
required
string

ID of the model to use.

presence_penalty
number
object

The prompt to generate completions for.

session
string

A unique identifier representing a user session. To help grouping completion requests

stream
boolean

Whether to incrementally stream the response using SSE.

temperature
number

Amount of randomness injected into the response. Ranges from 0 to 1.

Responses

Request samples

Content type
application/json
{
  • "frequency_penalty": 0,
  • "max_tokens": 20,
  • "model": "claude-v1.0",
  • "presence_penalty": 0,
  • "prompt": {
    },
  • "session": "string",
  • "stream": false,
  • "temperature": 1
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "model": "string",
  • "text": "string",
  • "stop_reason": "stop_sequence",
  • "usage": {
    }
}