# 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](https://docs.promptshuttle.com/getting-started/authentication))

## 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](https://docs.promptshuttle.com/api-reference/openai-compatible) 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](https://docs.promptshuttle.com/api-reference/flow-execution) for the full reference.

## Next steps

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