> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/workflow-builder/nodes/public-ai-llm-models/openai-cloud.md).

# OpenAI Cloud

The **OpenAI Cloud** node lets you use OpenAI inside a Diaflow workflow with your own API key. It is a good fit when your team already has an OpenAI account and wants direct control over model choice, usage, and cost.

<figure><img src="/files/ZjH1pAQJdqWfS0uWQf2M" alt=""><figcaption></figcaption></figure>

You can use this node for common business tasks such as writing replies, summarizing documents, extracting key points, classifying content, or creating structured answers from internal data.

{% hint style="info" %}
Diaflow runs the workflow. OpenAI charges usage to your own OpenAI account.
{% endhint %}

## What this node does

The node takes your instruction, sends it to the selected OpenAI model, and returns the result to the next step in the workflow. Depending on the model you choose, the result can support different types of work, but most business workflows use it for text generation and content understanding.

You can also pass in content from earlier steps. For example, you can send customer questions, uploaded text, knowledge base results, or form responses into this node and ask OpenAI to turn them into a useful business answer.

## When to use it

Use **OpenAI Cloud** when you want to connect Diaflow to your own OpenAI setup instead of using a model managed inside Diaflow. This is useful when your company already works with OpenAI, needs a specific OpenAI model, or wants billing to stay under the company’s OpenAI account.

Common use cases include:

* Summarize reports, emails, and meeting notes.
* Draft customer replies, proposals, or internal updates.
* Turn raw text into clean categories, answers, or JSON-style output.

## Before you start

Make sure you have:

* An active OpenAI account.
* A valid OpenAI API key.
* Permission to use the model you want.

## How to set it up

Set up the node in this order:

1. In **Credentials**, choose your saved OpenAI key.
2. In **Model**, choose the OpenAI model that fits your task.
3. In **Prompt**, describe what you want the model to do.
4. Run the node and review the result.

<figure><img src="/files/V429jLUKaRGSKmSfA1BV" alt="" width="309"><figcaption></figcaption></figure>

If you want the model to work from earlier workflow data, insert that data into the prompt with `@`.

## What each field means

### Credentials

This is where you select the OpenAI API key your team wants to use. If the correct key is not listed, use **Manage** to add it, then use **Refresh** to reload the list.

### Model

This is where you choose the OpenAI model. The list depends on the key and account you connected.

For most business users, the choice is simple:

* Choose a general text model for writing, summarizing, and question answering.
* Choose a stronger model when output quality matters more than speed or cost.
* Choose a specialized model only when your use case clearly requires it.

If you are unsure, start with a general-purpose text model and test the output on a real business example.

### Prompt

This is the instruction you give the model. Write it in plain language and focus on the business outcome you want.

A strong prompt usually includes:

* the task
* the context
* the expected format

For example:

```
Summarize this customer feedback into 3 key issues and 3 recommended actions.
Use a professional tone.
Return the result as bullet points.
```

If your workflow already has data from previous steps, insert it into the prompt with `@` so the model uses that content instead of guessing.

### Image source

Some OpenAI models support image-based tasks. When that option appears, use it to send an image from an earlier step into the model. This is only needed when your workflow is analyzing or working from images.

## Advanced configurations

Open **Show advanced configurations** when you need more control.

### Enable caching

Caching reuses a previous result when the same input runs again. This can help save time and reduce repeated calls.

Use caching when the same request is likely to run more than once and the answer does not need to change every time.

### Caching time

This controls how long the cached result stays available. A short caching time is useful when the content changes often. A longer caching time is useful when the request stays the same across repeated runs.

### Memory

When available, **Memory** helps the node keep track of earlier context in a longer interaction. This is more useful in conversational or multi-step experiences than in one-time tasks.

### Max token

This limits how long the model response can be. Use a lower value when you want short answers. Increase it when you need fuller summaries, longer drafts, or more detailed output.

### Output format

If you see an output format field such as **Formatted**, use it to guide how the answer should come back. This is helpful when another node needs a predictable structure.

## What you get back

The node returns the model’s result to the next step in your workflow. In most cases, that result is text. You can send it to an output node, save it, transform it, or pass it into another business process.

## Tips for business users

* Start with one clear task per prompt.
* Ask for a specific format such as bullets, JSON, or a short summary.
* Test with real content, not placeholder text.
* If the answer is too broad, tighten the instruction instead of only changing the model.

### Next steps

* Compare other providers in [Public AI/LLM Models](/workflow-builder/nodes/public-ai-llm-models.md).
* Learn the workflow basics in [Overview](/workflow-builder/overview.md).
* Browse more nodes in [Component List](/workflow-builder/component-list.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.diaflow.io/workflow-builder/nodes/public-ai-llm-models/openai-cloud.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
