FastAPI

BASE URL
https://data.mostly.ai

Authentication

Sign into view and manage your API credentials

List Models

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

GET
/models
1

Generate row completions.

Generate completions for a given prompt and rows.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

rows

optional, array

The existing values used as context for the newly generated values. The returned values will be of same length and in the same order as the provided list of values. Max 100 rows per request are allowed.

prompt

required, string

The prompt for generating the returned values.

model

required, string

The model used for generating new values. Check available models with the models.list endpoint. The default model is the first model in that list.

data_description
optional

Additional information regarding the context of the provided values.

dtype

optional, string enum, default: string

The dtype of the returned values. One of string, category, integer, float, boolean, date or datetime.

Possible Enum Values

string

category

integer

float

boolean

date

datetime

regex
optional

A regex used to limit the generated values.

categories
optional

The allowed values to be sampled from. If provided, then the dtype is set to category.

max_tokens
optional

The maximum number of tokens to generate. Only applicable for string dtype.

temperature
optional, default: 0.7

The temperature used for sampling.

top_p
optional, default: 1

The top_p used for nucleus sampling.

POST
/row-completions
1
EXAMPLE BODY
{
  "prompt": "incididunt culpa irure nulla proident",
  "model": "dolor tempor Duis",
  "data_description": null,
  "regex": null,
  "categories": [
    "anim officia cillum nulla ea",
    "laboris ullamco occaecat Ut velit",
    "in elit Lorem velit sed",
    "sunt",
    "dolor cupidatat"
  ],
  "temperature": 0.7
}