> For the complete documentation index, see [llms.txt](https://docs.snarkify.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snarkify.io/serverless-gpu-proving/snakrify-cli/service-initialization.md).

# Service Initialization

## Integrate with Snarkify SDK

{% hint style="info" %}
You can skip this section if you have already followed the steps in [Integrate Elastic Prover SDK](/serverless-gpu-proving/deploy-a-elastic-prover/integrate-elastic-prover-sdk.md)and verified your change locally.&#x20;
{% endhint %}

Switch to your project root directly, and run the following command:

```bash
snarkify init
```

It is simply a shortcut for:

1. Add `snarkify-sdk` cargo dependency to Cargo.toml
2. Create a template `snarkify.rs` file under `/src/bin`,  in which you have to implement the `ProofHandler` with your own proof generation logic.&#x20;

## Create your new service

Once your code is ready, running the following command will create a new service on Snarkify platform:

```
snarkify service create {service_name}
```

The new service will automatically link to your current project directory, ensuring that all future build and deploy commands seamlessly synchronizes the changes from your working directory to the cloud.

{% hint style="info" %}
Currently, our platform supports the creation of one service per code directory. We are actively working to enhance this feature, aiming to enable the support of multiple services from a single repository in the near future. Stay tuned for updates!
{% endhint %}

## Query your service

You can use the `snarkify service info` command to check the status of your service and get the RPC endpoint (`service url` field) once the deployment is done. Below is an example output:

<pre><code><strong>┌──────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────┐
</strong>│ service id   │ 6b72fa8b01bc4d968f49658e6cf2f5f2                                                                    │
│ service name │ poseidon_test                                                                                       │
│ team name    │ test                                                                                                │
│ state        │ READY                                                                                               │
│ created      │ 2024-01-22T23:16:51                                                                                 │
│ service url  │ https://2omfk53be1.execute-api.us-west-2.amazonaws.com/v1/services/6b72fa8b01bc4d968f49658e6cf2f5f2 │
│ image tag    │ feature_a                                                                                           │
└──────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────┘
</code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.snarkify.io/serverless-gpu-proving/snakrify-cli/service-initialization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
