Latenode LogoLatenode

ChatGPT

Send Message to ChatGPT node overview

The Send Message to ChatGPT node calls OpenAI models for text, images, and files inside your scenario.

Plug and Play (PnP) billing

This is a PnP (Plug and Play) node: Latenode meters usage and charges PnP tokens on top of execution credits (1 PnP token = $1). You do not add your own API key on this node. Per-model prices are shown in the node settings where you pick the model.

Your own API key

To use your provider account and key instead, add the Custom LLM Connection node and a connection with the provider Base URL (the key is stored in the connection).

Getting structured output

Default replies are plain text.

Basic ChatGPT prompt

For JSON downstream nodes can use, enable Structured Output and describe the JSON shape in the prompt.

Structured Output toggle

Example (receipt):

Structured output example in UI

You are given a receipt text. Extract the store name, purchase date, list of items with prices, and the total amount.

Receipt:
{receipt_text}

Respond in JSON using this format:
{
  "store": "...",
  "date": "...",
  "items": [
    { "name": "...", "price": 0.00 }
  ],
  "total": 0.00
}

Result after structured output

Advanced: Output JSON Schema

Schema format

ChatGPT and OpenRouter use a name wrapper around the schema. Claude does not. Copying between nodes without reformatting can fail.

Output JSON Schema field

{
  "name": "receipt_data",
  "schema": {
    "type": "object",
    "properties": {
      "store": { "type": "string", "description": "Store name" },
      "date": { "type": "string", "description": "Purchase date" },
      "total": { "type": "number", "description": "Total amount" }
    },
    "required": ["store", "date", "total"],
    "additionalProperties": false
  },
  "strict": true
}

Fields