ByteChef LogoByteChef

Nano GPT

The NanoGPT API allows you to generate text, images and video using any AI model available.

Categories: Artificial Intelligence

Type: nanoGpt/v1


Connections

Version: 1

Bearer Token

Properties

NameLabelTypeDescriptionRequired
tokenTokenSTRINGtrue

Connection Setup

  1. Navigate to NanoGPT console.
  2. Click on API.
  3. Click on Create API Key.
  4. Enter name of your new key.
  5. Click on Create.
  6. Here is your new API key.
  7. Done 🚀.

Actions

Ask

Name: ask

Ask anything you want.

Properties

NameLabelTypeDescriptionRequired
modelModelSTRINGID of the model to use.true
userPromptPromptSTRINGUser prompt to the model.true
formatFormatSTRING
Options SIMPLE, ADVANCED
Format of providing the prompt to the model.true
systemPromptSystem PromptSTRINGSystem prompt to the model.false
attachmentsAttachmentsARRAY
Items [FILE_ENTRY]
Only text and image files are supported. Also, only certain models supports images. Please check the documentation.false
messagesMessagesARRAY
Items [{STRING(role), STRING(content), [FILE_ENTRY](attachments)}]
A list of messages comprising the conversation so far.true
responseResponseOBJECT
Properties {STRING(responseFormat), STRING(responseSchema)}
The response from the API.true
frequencyPenaltyFrequency PenaltyNUMBERNumber between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.false
logitBiasLogit BiasOBJECT
Properties {}
Modify the likelihood of specified tokens appearing in the completion.false
logprobsLogprobsBOOLEAN
Options true, false
Return log probabilities.false
maxCompletionTokensMax Completion TokensINTEGERMaximum tokens in completion.false
maxTokensMax TokensINTEGERThe maximum number of tokens to generate in the chat completion.false
presencePenaltyPresence PenaltyNUMBERNumber between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.false
reasoningReasoning effortSTRING
Options none, minimal, low, medium, high, xhigh
Constrains effort on reasoning. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. For reasoning models for gpt-5 and o-series models only.false
seedSeedINTEGERKeeping the same seed would output the same response.false
stopStopARRAY
Items [STRING]
Up to 4 sequences where the API will stop generating further tokens.false
temperatureTemperatureNUMBERControls randomness: Higher values will make the output more random, while lower values like will make it more focused and deterministic.false
topLogprobsTop LogprobsINTEGERNumber of top log probabilities to return (0-20).false
topKTop KINTEGERSpecify the number of token choices the generative uses to generate the next token.false
topPTop PNUMBERAn alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.false
verbosityVerbositySTRING
Options low, medium, high
Adjusts response verbosity. Lower levels yield shorter answers.false
userUserSTRINGA unique identifier representing your end-user, which can help admins to monitor and detect abuse.false
minPMin PNUMBERProbability floor for candidate tokens (0–1). Helps prevent low-entropy loops.false
minTokensMin TokensINTEGERMinimum completion length before stop conditions fire.false
mirostatModeMirostat ModeINTEGER
Options 0, 1, 2
Enables Mirostat sampling. Set to 1 or 2 to activate.false
mirostatTauMirostat TauNUMBERMirostat target entropy. Active when Mirostat Mode is 1 or 2.false
mirostatEtaMirostat EtaNUMBERMirostat learning rate. Active when Mirostat Mode is 1 or 2.false
repetitionPenaltyRepetition PenaltyNUMBERProvider-agnostic repetition modifier. Values > 1 discourage repetition.false
tfsTFSNUMBERTail free sampling (0–1). Value 1.0 disables.false
topATop ANUMBERBlends temperature and nucleus sampling behavior.false
typicalPTypical PNUMBEREntropy-based nucleus sampling (0–1). Preserves tokens matching expected entropy.false

Example JSON Structure

{
  "label" : "Ask",
  "name" : "ask",
  "parameters" : {
    "model" : "",
    "userPrompt" : "",
    "format" : "",
    "systemPrompt" : "",
    "attachments" : [ {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    } ],
    "messages" : [ {
      "role" : "",
      "content" : "",
      "attachments" : [ {
        "extension" : "",
        "mimeType" : "",
        "name" : "",
        "url" : ""
      } ]
    } ],
    "response" : {
      "responseFormat" : "",
      "responseSchema" : ""
    },
    "frequencyPenalty" : 0.0,
    "logitBias" : { },
    "logprobs" : false,
    "maxCompletionTokens" : 1,
    "maxTokens" : 1,
    "presencePenalty" : 0.0,
    "reasoning" : "",
    "seed" : 1,
    "stop" : [ "" ],
    "temperature" : 0.0,
    "topLogprobs" : 1,
    "topK" : 1,
    "topP" : 0.0,
    "verbosity" : "",
    "user" : "",
    "minP" : 0.0,
    "minTokens" : 1,
    "mirostatMode" : 1,
    "mirostatTau" : 0.0,
    "mirostatEta" : 0.0,
    "repetitionPenalty" : 0.0,
    "tfs" : 0.0,
    "topA" : 0.0,
    "typicalP" : 0.0
  },
  "type" : "nanoGpt/v1/ask"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Create Image

Name: createImage

Create an image using text-to-image models.

Properties

NameLabelTypeDescriptionRequired
modelModelSTRINGID of the model to use.true
imageMessagesMessagesARRAY
Items [{STRING(content), NUMBER(weight)}]
A list of messages comprising the conversation so far.true
sizeSizeSTRING
Options 256x256, 512x512, 1024x1024
The size of the generated image.false
responseFormatResponse FormatSTRING
Options url, b64_json
Whether to return a signed URL or base64-encoded bytes.false
nNumber of ImagesINTEGERNumber of images to generate.false
seedSeedINTEGERRandom seed for reproducible generation.false
guidanceScaleGuidance ScaleNUMBERHow closely the model follows the text prompt (0–20).false
strengthStrengthNUMBERHow much the output differs from the input image in img2img mode (0–1).false
numInferenceStepsInference StepsINTEGERNumber of denoising steps. More steps produce higher quality but take longer (1–100).false
userUserSTRINGA unique identifier representing your end-user, which can help admins to monitor and detect abuse.false

Example JSON Structure

{
  "label" : "Create Image",
  "name" : "createImage",
  "parameters" : {
    "model" : "",
    "imageMessages" : [ {
      "content" : "",
      "weight" : 0.0
    } ],
    "size" : "",
    "responseFormat" : "",
    "n" : 1,
    "seed" : 1,
    "guidanceScale" : 0.0,
    "strength" : 0.0,
    "numInferenceSteps" : 1,
    "user" : ""
  },
  "type" : "nanoGpt/v1/createImage"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Create Speech

Name: createSpeech

Generate an audio file from the input text.

Properties

NameLabelTypeDescriptionRequired
modelModelSTRINGID of the model to use.true
inputInputSTRINGThe text to synthesize.true
voiceVoiceSTRINGVoice identifier (model-specific).false
responseFormatResponse FormatSTRING
Options mp3, wav, opus, aac, flac, pcm
Audio output format (OpenAI models only).false
speedSpeedNUMBERPlayback speed (0.1–5). Not supported for gpt-4o-mini-tts.false

Example JSON Structure

{
  "label" : "Create Speech",
  "name" : "createSpeech",
  "parameters" : {
    "model" : "",
    "input" : "",
    "voice" : "",
    "responseFormat" : "",
    "speed" : 0.0
  },
  "type" : "nanoGpt/v1/createSpeech"
}

Output

Type: OBJECT

Properties

NameTypeDescription
fileFILE_ENTRYThe generated audio file.
audioUrlSTRINGURL to the generated audio file

Output Example

{
  "file" : {
    "extension" : "",
    "mimeType" : "",
    "name" : "",
    "url" : ""
  },
  "audioUrl" : ""
}

Create Transcription

Name: createTranscription

Transcribes audio into text.

Properties

NameLabelTypeDescriptionRequired
modelModelSTRINGID of the model to use.true
fileFileFILE_ENTRYThe audio file to transcribe. Supported formats: MP3, WAV, M4A, OGG, AAC (max 3MB).true
languageLanguageSTRING
Options af, am, ar, as, az, ba, be, bg, bn, bo, br, bs, ca, cs, cy, da, de, el, en, es, et, eu, fa, fi, fo, fr, gl, gu, ha, haw, he, hi, hr, ht, hu, hy, id, is, it, ja, jw, ka, kk, km, kn, ko, la, lb, ln, lo, lt, lv, mg, mi, mk, ml, mn, mr, ms, mt, my, ne, nl, nn, no, oc, pa, pl, ps, pt, ro, ru, sa, sd, si, sk, sl, sn, so, sq, sr, su, sv, sw, ta, te, tg, th, tk, tl, tr, tt, uk, ur, uz, vi, yi, yo, yue, zh
The language of the input audio.false

Example JSON Structure

{
  "label" : "Create Transcription",
  "name" : "createTranscription",
  "parameters" : {
    "model" : "",
    "file" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    },
    "language" : ""
  },
  "type" : "nanoGpt/v1/createTranscription"
}

Output

Type: STRING

How is this guide?

Last updated on

On this page