# 302.AI — Pipedream Connect

> 302.AI is a pay-as-you-go enterprise AI resource hub that offers the latest and most comprehensive AI models and APIs on the market, along with a variety of ready-to-use online AI applications.

- API slug: `_302_ai` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Artificial Intelligence (AI)
- Website: https://302.ai
- This page (HTML): https://pipedream.com/apps/302-ai
- Tools: 8 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: _302_ai`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "_302_ai",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Chat using Functions:
const result = await mcp.callTool({
  name: "_302_ai-chat-using-functions",
  arguments: {
    modelId: "Model",
    input: "Chat Input",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "_302_ai-chat-using-functions",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    _302_ai: { authProvisionId: "apn_xxxxxxx" },
    modelId: "Model",
    input: "Chat Input",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (8)

### `_302_ai-chat-using-functions` — Chat using Functions (Write)

Enable your 302.AI model to invoke user-defined functions. Useful for conditional logic, workflow orchestration, and tool invocation within conversations. See documentation

Full schema: https://pipedream.com/apps/302-ai/actions/chat-using-functions.md

### `_302_ai-chat-with-302-ai` — Chat with 302.AI (Write)

Send a message to the 302.AI Chat API. Ideal for dynamic conversations, contextual assistance, and creative generation. See documentation

Full schema: https://pipedream.com/apps/302-ai/actions/chat-with-302-ai.md

### `_302_ai-classify-items` — Classify Items (Read-only)

Classify input items into predefined categories using 302.AI models. Perfect for tagging, segmentation, and automated organization. See documentation

Full schema: https://pipedream.com/apps/302-ai/actions/classify-items.md

### `_302_ai-create-embeddings` — Create Embeddings (Read-only)

Generate vector embeddings from text using the 302.AI Embeddings API. Useful for semantic search, clustering, and vector store indexing. See documentation

Full schema: https://pipedream.com/apps/302-ai/actions/create-embeddings.md

### `_302_ai-list-chat-completion-model-id-options` — List Chat Completion Model ID Options (Read-only)

Retrieves available options for the Chat Completion Model ID field.

Full schema: https://pipedream.com/apps/302-ai/actions/list-chat-completion-model-id-options.md

### `_302_ai-list-embeddings-model-id-options` — List Embeddings Model ID Options (Read-only)

Retrieves available options for the Embeddings Model ID field.

Full schema: https://pipedream.com/apps/302-ai/actions/list-embeddings-model-id-options.md

### `_302_ai-list-model-id-options` — List Model ID Options (Read-only)

Retrieves available options for the Model ID field.

Full schema: https://pipedream.com/apps/302-ai/actions/list-model-id-options.md

### `_302_ai-summarize-text` — Summarize Text (Read-only)

Summarize long-form text into concise, readable output using the 302.AI Chat API. Great for reports, content digestion, and executive briefs. See documentation

Full schema: https://pipedream.com/apps/302-ai/actions/summarize-text.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
