Skip to main content

OPENAI GPT NANO 5.4

A text model (OPENAI-GPT-NANO-5.0) available through the ImageGPT Text Generation API.

PropertyValue
Model IDOPENAI-GPT-NANO-5.0
PlaygroundText
Pricing3 credits per 1,000 output tokens

Headers​

Send your API key in the x-api-key header on every request. See Authentication for details.

HeaderRequiredValue
x-api-keyYesYOUR_API_KEY
Content-TypeYesapplication/json

A missing or invalid key returns 401 Unauthorized.

Parameters​

Request body fields for /generate/text:

ParameterTypeRequiredDefaultDescription
modelstringYes—Model ID to use for generation. See the model list below for all available IDs.
promptstringYes—The user prompt / instruction to send to the model.
systemstringNo""Optional system message to set the model's behavior or persona.
outputTypestringNo"text"Output format. Use "text" for plain text or "json" to receive a structured JSON response.
maxTokensnumberNomodel maxMaximum number of output tokens to generate. Minimum value is 100.

Request examples​

curl -X POST https://api.imagegpt.online/generate/text \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"model":"OPENAI-GPT-NANO-5.0","prompt":"Build a simple Tic Tac Toe game using only HTML, CSS, and JavaScript with two-player turn-by-turn gameplay and a restart button after the game ends.","system":"You are a friendly assistant.","outputType":"text"}'

Response example​

text

A plain text string from the model.

json

{
"success": true,
"output": "...",
"usage": {
"inputTokens": 0,
"outputTokens": 0,
"creditsDeducted": 0
}
}

Pricing​

3 credits per 1,000 output tokens. Input tokens are always free. The credit value shown per model is charged per 1,000 output tokens.

Playground​

Try this model live. Your key is used only in your browser to call the API directly and is never stored.

note

The browser playground calls https://api.imagegpt.online directly, so it only works if the API allows cross-origin requests from this site. If it is blocked, use the cURL, JavaScript, or Python samples above from your own server.