# Is it possible to use slicer as a service?

**URL:** <https://discourse.slicer.org/t/is-it-possible-to-use-slicer-as-a-service/36848>\
**Category:** Development\
**Tags:** python, web\
**Created:** [June 17, 2024, 7:24pm UTC](https://discourse.slicer.org/t/is-it-possible-to-use-slicer-as-a-service/36848 "2024-06-17T19:24:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![youngishcord](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/youngishcord/32/76997_2.png) [@youngishcord](https://discourse.slicer.org/u/youngishcord)\
**Post date:** [June 17, 2024, 7:24pm UTC](https://discourse.slicer.org/t/is-it-possible-to-use-slicer-as-a-service/36848/1 "2024-06-17T19:24:21Z")

</div>

There is a plan to use a slicer to extract some data from the CT scan. The rest of the program architecture is deployed in Docker.  
The best option would be to connect celery and assign tasks through it, but it didn’t work out for me.  
Is it possible to implement celery into a slicer or at least set up a server with its own API.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 17, 2024, 7:27pm UTC](https://discourse.slicer.org/t/is-it-possible-to-use-slicer-as-a-service/36848/2 "2024-06-17T19:27:46Z")

</div>

Slicer has a web API - see documentation [here](https://slicer.readthedocs.io/en/latest/user_guide/modules/webserver.html). It exposes only a small fraction of things that Slicer can do, but any module can customize and extend the API, so it should not be a problem to make available any features you need.

---

<div class="post-metadata">

**Author:** ![youngishcord](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/youngishcord/32/76997_2.png) [@youngishcord](https://discourse.slicer.org/u/youngishcord)\
**Post date:** [June 18, 2024, 9:39am UTC](https://discourse.slicer.org/t/is-it-possible-to-use-slicer-as-a-service/36848/3 "2024-06-18T09:39:56Z")

</div>

I think that “GET /exec” is partially suitable for solving my problems. I’ll see what I can come up with.  
Perhaps later I’ll add the solution I came to.  
Thank you!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 19, 2024, 4:40pm UTC](https://discourse.slicer.org/t/is-it-possible-to-use-slicer-as-a-service/36848/4 "2024-06-19T16:40:08Z")

</div>

Just FYI @youngishcord - the `exec` endpoint is great for prototyping but it may be cleaner and a bit safer to define a few specific endpoints to do the jobs you have in mind.
