# Migration Guides

## Migration Guides

Three migration paths are available depending on your current setup. Full migration guides with complete code examples are in the plugin's `migration/` directory.

***

### 1. From OpenAI

#### Concept Mapping

| OpenAI                            | ChainGPT Equivalent                               |
| --------------------------------- | ------------------------------------------------- |
| Assistants API / Chat Completions | ChainGPT LLM Chat                                 |
| DALL-E                            | NFT Generator (VeloGen, Nebula, Visionary, Dale3) |
| Custom fine-tuned models          | Solidity LLM (self-hosted, open-source)           |

#### Code Migration

**OpenAI (before):**

```javascript
const response = await openai.chat.completions.create({
  model: "gpt-4",
  messages: [{ role: "user", content: "Explain ERC-721" }]
});
```

**ChainGPT (after):**

```javascript
const response = await fetch("https://api.chaingpt.org/chat", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${CHAINGPT_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ question: "Explain ERC-721" })
});
```

#### Pricing Comparison

* OpenAI GPT-4: \~$0.03-0.06 per 1K tokens
* ChainGPT LLM Chat: $0.005-0.01 per request (flat rate, Web3-optimized)

ChainGPT offers predictable per-request pricing rather than token-based billing, with responses specifically tuned for blockchain and Web3 use cases.

***

### 2. From Alchemy AI

Two strategies are available:

**Complementary approach** -- Keep Alchemy for on-chain data and indexing, add ChainGPT for AI capabilities (LLM, NFT generation, contract auditing). The two services cover different needs and work well together.

**Replacement approach** -- ChainGPT covers AI chat, smart contract generation/auditing, NFT creation, and blockchain news. Migrate AI-specific workloads to ChainGPT while retaining Alchemy for raw blockchain data if needed.

***

### 3. From Custom AI Solutions

#### Cost Comparison

| Approach                        | Monthly Cost (typical) |
| ------------------------------- | ---------------------- |
| Self-hosted LLM (GPU infra)     | $500-5,000+            |
| Custom fine-tuned model (cloud) | $200-2,000+            |
| ChainGPT API (equivalent usage) | $5-50                  |

#### Hybrid Approach

You don't have to migrate everything at once:

1. Start with ChainGPT for **new features** (NFT generation, contract auditing)
2. Run your existing solution **in parallel** with ChainGPT LLM Chat
3. Compare quality and cost over 30 days
4. Gradually shift traffic based on results

The mock server lets you test the full integration at zero cost before committing.

***

### Full Migration Guides

The plugin's `migration/` directory contains detailed guides with:

* Step-by-step migration checklists
* Complete code examples for each platform
* Configuration templates
* Rollback procedures


---

# 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.chaingpt.org/dev-docs-b2b-saas-api-and-sdk/chaingpt-claude-skill-and-plugin/resources/migration-guides.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.
