> For the complete documentation index, see [llms.txt](https://opengpu-network.gitbook.io/opengpu-network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://opengpu-network.gitbook.io/opengpu-network/for-clients/publishing-tasks.md).

# Publishing Tasks

A Task is a computational job submitted from a Source. Providers registered for that Source compete to execute it.

## What's in a Task

| Component   | Description                      |
| ----------- | -------------------------------- |
| **Source**  | The execution environment to use |
| **Config**  | Task parameters (JSON)           |
| **Payment** | Amount in $OGPU                  |
| **Expiry**  | Deadline for completion          |

## Publishing a Task

### Via Client App

1. Go to [client.opengpu.network](https://client.opengpu.network)
2. Select your Source
3. Click "New Task"
4. Enter:
   * Configuration (model parameters, inputs, etc.)
   * Payment amount
   * Expiry duration
5. Submit

### Via SDK

```python
task = await client.tasks.submit(
    source_address="0x...",
    config={
        "prompt": "Explain quantum computing",
        "max_tokens": 500,
        "temperature": 0.7
    },
    payment=0.01,
    expiry_minutes=30
)
```

## Task Lifecycle

```
Published → Attempted → Responded → Finalized
    │           │           │           │
    │           │           │           └─ Payment released
    │           │           └─ Result submitted
    │           └─ Provider(s) started executing
    └─ Payment locked in escrow
```

### Possible Statuses

| Status        | Meaning                           |
| ------------- | --------------------------------- |
| **New**       | Published, awaiting attempts      |
| **Attempted** | Provider(s) started executing     |
| **Responded** | Result(s) submitted               |
| **Finalized** | Completed, payment released       |
| **Expired**   | Deadline passed, payment refunded |
| **Canceled**  | Client canceled, payment refunded |

## Retrieving Results

### Via Client App

Results appear in your task history. Download from the UI.

### Via SDK

```python
# Wait for completion
while task.status != "finalized":
    await asyncio.sleep(5)
    task.refresh()

# Get result
result = await task.get_result()
print(result.data)
```

Results are stored on IPFS and linked in the response.

### Via Direct RPC

For full control, interact with the protocol contracts directly via RPC.

## Tips

* **Set realistic expiry times** — Too short may result in no completions
* **Check provider availability** — Ensure providers are registered for your Source
* **Monitor via Management dApp** — Track task progress at [management.opengpu.network](https://management.opengpu.network)
