# Relay

Relay is an API-based AI service that uses OpenGPU Network as its infrastructure.

## What Is Relay?

Relay provides a developer-friendly API gateway to GPU compute—no blockchain knowledge required.

* **Familiar APIs**: Compatible with standard model interfaces
* **No wallet needed**: Standard API key authentication
* **Multiple AI capabilities**: Chat, TTS, ASR, image generation
* **Dual-mode**: Can use OpenGPU Network (decentralized) or direct relaying (central routing)

## When to Use Relay vs OpenGPU

| Use Relay                          | Use OpenGPU                |
| ---------------------------------- | -------------------------- |
| Want simple API access             | Want full protocol control |
| Don't need blockchain transparency | Need on-chain verification |
| Prefer API keys over wallets       | Building custom Sources    |
| Real-time, low-latency needed      | Building on the protocol   |

## Quick Example

```bash
curl -X POST https://relay.opengpu.network/api/ollama/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "model": "llama3.2:3b",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

## Getting Started with Relay

1. Visit [relaygpu.com](https://relaygpu.com)
2. Try as guest or sign up for free credits
3. Start making API calls

Relay handles all blockchain interactions to abstract away web3.

→ **Full Relay documentation**: [docs.relaygpu.com](https://docs.relaygpu.com)


---

# 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://opengpu-network.gitbook.io/opengpu-network/for-clients/relay.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.
