# Prismic Rest API Type Generation

**URL:** https://community.prismic.io/t/prismic-rest-api-type-generation/8682
**Category:** Community Showcase & Announcements
**Created:** [January 16, 2022, 3:13pm UTC](https://community.prismic.io/t/prismic-rest-api-type-generation/8682 "2022-01-16T15:13:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bennlongg](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bennlongg](https://community.prismic.io/u/bennlongg)
#### Post date: [January 16, 2022, 3:13pm UTC](https://community.prismic.io/t/prismic-rest-api-type-generation/8682/1 "2022-01-16T15:13:57Z")

</div>

Hi everyone! 👋

Very much a WIP, but I have written a little tool that generates typings from the custom types API.

I have been using Prismic for a while now, mainly with Gatsby where I can use [graphql codegen](https://www.graphql-code-generator.com/) for type safety. Recently I have been loving using NextJS and the Prismic REST API (@prismico/client), but having to manually type everything can be tedious.

Hopefully it can come in handy for any typescript devs!

> **[prismic-type-gen](https://www.npmjs.com/package/prismic-type-gen)**
>
> Type generator for prismics rest api. Latest version: 0.0.7, last published: 2 years ago. Start using prismic-type-gen in your project by running \`npm i prismic-type-gen\`. There are no other projects in the npm registry using prismic-type-gen.

---

<div class="post-metadata">

### Author: ![sanne.v1stra](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/sanne.v1stra/32/4276_2.png) [@sanne.v1stra](https://community.prismic.io/u/sanne.v1stra)
#### Post date: [April 2, 2022, 8:09pm UTC](https://community.prismic.io/t/prismic-rest-api-type-generation/8682/2 "2022-04-02T20:09:52Z")

</div>

Hi @bennlongg ! Seems promising though! I'd love to see also a generator for Slices! And to be honest, Prismic should provide these also! (By default generating them with Slicemachine)

Keep up the good work.
