# Onchain AI Oracle

**ORA's Onchain AI Oracle** is a verifiable oracle protocol that allows developers to create smart contracts and applications that ingest verifiable machine learning (ML) inferences for uses on the blockchain.

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><p><a href="/pages/ZTsfCirx6OtJyo0whmSk">Build with ORA's <br>AI Oracle</a></p><p><a href="#components">🔮</a></p></td><td></td></tr><tr><td></td><td><p><a href="/pages/TBkBCeTw2X2HxTDhSTLl">Operate a Node:</a></p><p><a href="/pages/TBkBCeTw2X2HxTDhSTLl">TORA  Client </a></p><p><a href="#components">💻</a></p></td><td></td></tr><tr><td></td><td><a href="/pages/R9cFpfAzAbHQWup0Dzvb">Learn: Fraud Proof Virtual Machine (FPVM) </a>⚙️</td><td></td></tr></tbody></table>

<figure><img src="/files/uDsrFIEE8d0CCzvtb1PF" alt=""><figcaption></figcaption></figure>

AI Oracle is powered by **Optimistic Machine Learning (opML).** It enables a verifiable, transparent, and decentralized way to integrate advanced ML models like LLaMA 3 and Stable Diffusion into smart contracts.

It offers:

* **Scalability:** Can run any ML model onchain without prohibitive overhead.
* **Efficiency:** Reduces computational time and cost when compared to zkML.
* **Practicality:** Can easily be integrated into applications by using existing blockchain infrastructure.
* **Verifiability:** Leverages fraud proofs to provide applications and users with assured computational integrity.

## Components

AI Oracle comprises a set of smart contracts and off-chain components:

1. **opML Contract**: Handles fraud proofs and challenges to ensure on-chain verifiability of ML computations.
2. **AIOracle Contract**: Connects the opML node with on-chain callers to process ML requests and integrates various ML models.
3. **User Contract**: Customizable contracts that initiate AI inference requests and receive results from directly from AI Oracle.
4. **ORA Nodes**: Machines that run the **Tora Client** that interact with the ORA network. Nodes currently perform two functions: submit or validate inference results.

<figure><img src="/files/KCDr98KXgg7b9qAsRtGP" alt=""><figcaption></figcaption></figure>


---

# 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.ora.io/doc/onchain-ai-oracle-oao/onchain-ai-oracle.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.
