> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herodotus.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Sending Query

> Prepare appropriate request body based on your input and desired outcome.

Use this page to choose the right request body based on your input (`programFile` or
`pieFile`) and expected result.

<Note>
  For production scripts and AI agents, prefer the HCloud SDK or CLI for
  Atlantic submission, polling, artifact download, auth reuse, and x402
  handling. If you want full control over the wire client, implement it from the
  Atlantic OpenAPI contract at [https://atlantic.api.herodotus.cloud/docs/json](https://atlantic.api.herodotus.cloud/docs/json).
</Note>

For step-by-step details, see:

* [Trace Generation](/atlantic-api/steps/trace-generation)
* [Proof Generation](/atlantic-api/steps/proof-generation)
* [L1 Proof Verification](/atlantic-api/steps/l1-proof-verification)
* [L2 Proof Verification](/atlantic-api/steps/l2-proof-verification)

For all queries, send:

* `api-key` as a request header
* `declaredJobSize` in the request body
* `sharpProver` only when you want to override the default prover; accepted values
  are `stone` and `stwo`, and the default is `stone`

`declaredJobSize` determines the machine used for trace generation and affects cost.
Choose it based on expected program step count.

| Number of steps \[millions] | Size |
| --------------------------- | ---- |
| 0 - 13                      | S    |
| 13 - 30                     | M    |
| >30                         | L    |

## Input: Cairo Program (`programFile`)

1. **Generate trace (`pie.zip`)**

* Inputs:
  * `programFile`
  * `inputFile` (optional, available for Cairo1 and Cairo0 with Rust VM)
  * `layout` (can be `auto`)
  * `cairoVersion`
  * `result = TRACE_GENERATION`
* `pieFile` must be empty
* Output: trace file (`pie.zip`)

2. **Generate proof file (`proof.json`)**

* Inputs:
  * `programFile`
  * `inputFile` (optional, available for Cairo1 and Cairo0 with Rust VM)
  * `layout` (can be `auto`)
  * `cairoVersion`
  * `result = PROOF_GENERATION`
  * `sharpProver` (`stone` or `stwo`) - defaults to `stone`; set to `stwo` to use S-two
* `pieFile` must be empty
* Output: proof file (`proof.json`)

3. **Generate proof and verify on Layer 1 (L1)**

* Inputs:
  * `programFile`
  * `inputFile` (optional, available for Cairo1 and Cairo0 with Rust VM)
  * `layout` (can be `auto`)
  * `cairoVersion`
  * `result = PROOF_VERIFICATION_ON_L1`
  * `sharpProver` (`stone` or `stwo`) - defaults to `stone`; set to `stwo` to use S-two
* `pieFile` must be empty
* Output: trace, proof, and L1 verification

4. **Generate proof and verify on Layer 2 (L2)**

* Inputs:
  * `programFile`
  * `inputFile` (optional, available for Cairo1 and Cairo0 with Rust VM)
  * `layout` (can be `auto`)
  * `cairoVersion`
  * `result = PROOF_VERIFICATION_ON_L2`
* `pieFile` must be empty
* Output: trace, proof, and L2 verification

## Input: Trace File (`pie.zip`)

1. **Generate proof file (`proof.json`)**

* Inputs:
  * `pieFile`
  * `layout` (can be `auto`)
  * `result = PROOF_GENERATION`
  * `sharpProver` (`stone` or `stwo`) - defaults to `stone`; set to `stwo` to use S-two
* Output: proof file (`proof.json`)

2. **Generate proof and verify on Layer 1 (L1)**

* Inputs:
  * `pieFile`
  * `layout` (can be `auto`)
  * `result = PROOF_VERIFICATION_ON_L1`
  * `sharpProver` (`stone` or `stwo`) - defaults to `stone`; set to `stwo` to use S-two
* Output: proof and L1 verification

3. **Generate proof and verify on Layer 2 (L2)**

* Inputs:
  * `pieFile`
  * `layout` (can be `auto`)
  * `result = PROOF_VERIFICATION_ON_L2`
* Output: proof and L2 verification
