# Quickstart

Get a response from an LLM in under two minutes.

## Prerequisites

* A PromptShuttle account at [app.promptshuttle.com](https://app.promptshuttle.com)
* An API key (see [Authentication](/getting-started/authentication.md))

## Option 1: OpenAI-compatible endpoint

If you already use the OpenAI SDK, just swap the base URL and key:

{% tabs %}
{% tab title="curl" %}

```bash
curl https://app.promptshuttle.com/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [
      {"role": "user", "content": [{"type": "text", "text": "Say hello!"}]}
    ]
  }'
```

{% endtab %}

{% tab title="Python (OpenAI SDK)" %}

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://app.promptshuttle.com/api/v1",
    api_key="YOUR_API_KEY",
)

response = client.chat.completions.create(
    model="openai/gpt-4o",
    messages=[{"role": "user", "content": "Say hello!"}],
)

print(response.choices[0].message.content)
```

{% endtab %}

{% tab title="TypeScript (OpenAI SDK)" %}

```typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://app.promptshuttle.com/api/v1",
  apiKey: "YOUR_API_KEY",
});

const response = await client.chat.completions.create({
  model: "openai/gpt-4o",
  messages: [{ role: "user", content: "Say hello!" }],
});

console.log(response.choices[0].message.content);
```

{% endtab %}
{% endtabs %}

The response follows the standard OpenAI chat completion format. See the [full endpoint reference](/api-reference/openai-compatible.md) for all options.

## Option 2: Create and run a flow

Flows let you version your prompts, add parameters, and route across environments.

### 1. Create a flow

In the [PromptShuttle UI](https://app.promptshuttle.com), click **Flows > Create Flow**. Give it a title (e.g. "Product Description Generator") — a slug name is auto-generated.

### 2. Edit the template

In the flow editor, write your prompt template:

```
You are a product copywriter. Write a compelling product description
for [[product_name]]. The tone should be [[tone]].
Keep it under 100 words.
```

Parameters use double square brackets: `[[parameter_name]]`. PromptShuttle auto-detects them.

Select a model (e.g. `openai/gpt-4o`) and save.

### 3. Activate for an environment

Go to the flow's environment settings and activate your version for an environment (e.g. `production`).

### 4. Execute via API

```bash
curl -X POST https://app.promptshuttle.com/api/v1/flows/product_description_generator/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parameters": {
      "product_name": "Wireless Noise-Cancelling Headphones",
      "tone": "professional yet approachable"
    },
    "environment": "production"
  }'
```

The response includes the LLM output, token usage, cost, and any warnings about unresolved parameters. See [Flow Execution API](/api-reference/flow-execution.md) for the full reference.

## Next steps

* [Authentication](/getting-started/authentication.md) — API keys and bearer tokens
* [Key Concepts](/getting-started/key-concepts.md) — Flows, templates, tools, environments
* [OpenAI-Compatible Endpoint](/api-reference/openai-compatible.md) — Full reference for the drop-in endpoint
* [Streaming](/api-reference/streaming.md) — Real-time SSE events for agent execution


---

# Agent Instructions: 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:

```
GET https://docs.promptshuttle.com/getting-started/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
