> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trychannel3.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Context

**Context** is who this chat is with, and what your app is. Set it **only on the first turn**. It sticks for the whole conversation. Sending it again on a later turn is a `422`. Each field can be up to 4,000 characters.

* `user_context` — the shopper (preferences, budget, size).
* `application_context` — context on your app, where this conversation is taking place

```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
const stream = await client.conversations.createTurnStream({
  message: {
    role: "user",
    parts: [{ type: "text", text: "Weekend outfits" }],
  },
  context: {
    user_context:
      "25 year old software engineer in Williamsburg. Prefers minimalist styles, budget under $200.",
    application_context: "Shopping assistant inside a banking app.",
  },
});
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
stream = client.conversations.create_turn_stream(
    message={
        "role": "user",
        "parts": [{"type": "text", "text": "Weekend outfits"}],
    },
    context={
        "user_context": "25 year old software engineer in Williamsburg. Prefers minimalist styles, budget under $200.",
        "application_context": "Shopping assistant inside a banking app.",
    },
)
```

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -N -X POST https://api.trychannel3.com/v1/conversations \
  -H "x-api-key: $CHANNEL3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "role": "user",
      "parts": [{"type": "text", "text": "Weekend outfits"}]
    },
    "context": {
      "user_context": "25 year old software engineer in Williamsburg. Prefers minimalist styles, budget under $200.",
      "application_context": "Shopping assistant inside a banking app."
    }
  }'
```

For hard catalog rules on a single turn (in-stock, a set of retailers), use [filters](/conversations/filters.md). To bind the chat to a saved set of brands, websites, categories, or products, pass `config.collection_id` on every turn — Channel3 tells the model what that collection covers so empty results can be explained. See [Collections](/guides/collections.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.