---
title: Convert JSON to GraphQL Schema API
slug: convert-json-to-graphql-sdl
url: https://apyverse.com/apyhub/service/convert-json-to-graphql-sdl
provider: ApyHub
categories: [Developer Tools, File Conversion, Smart Generation]
tags: [graphql, json-conversion, schema-generation, developer-tools, file-conversion]
auth: api_key
---

# Convert JSON to GraphQL Schema API

Convert raw JSON, JSON files, or JSON URLs into GraphQL SDL. Get inline text, a .graphql download, or a pre-signed S3 URL.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/convert/json-url/graphql-raw` | What it does Converts the JSON document available at the provided URL into GraphQL SDL, returning t… | 50 |
| POST | `/convert/json-url/graphql-url` | What it does Converts JSON fetched from a URL into GraphQL SDL, then returns a pre-signed S3 URL fo… | 50 |
| POST | `/convert/json-file/graphql-file` | What it does Converts an uploaded JSON file into a downloadable GraphQL SDL file. The request sends… | 50 |
| POST | `/convert/json-file/graphql-url` | What it does Converts an uploaded JSON file into GraphQL SDL and returns a pre-signed S3 URL where… | 50 |
| POST | `/convert/json-raw/graphql-raw` | What it does Converts a raw JSON object in the request body into GraphQL SDL and returns the SDL as… | 50 |
| POST | `/convert/json-raw/graphql-url` | What it does Converts a raw JSON body into GraphQL SDL and returns a pre-signed S3 URL for the gene… | 50 |
| POST | `/convert/json-url/graphql-file` | What it does Converts a JSON document available at a public URL into a GraphQL SDL file and returns… | 50 |
| POST | `/convert/json-file/graphql-raw` | What it does Converts an uploaded JSON file into GraphQL SDL and returns the SDL inline in the resp… | 50 |
| POST | `/convert/json-raw/graphql-file` | What it does Converts a raw JSON object in the request body into GraphQL SDL and returns the result… | 50 |

## About

## What it does
JSON to GraphQL SDL converts a JSON object into GraphQL schema definition language (SDL). Send raw JSON, upload a JSON file, or point it at a public JSON URL, and get SDL back as inline text, a downloadable `.graphql` file, or a pre-signed S3 URL depending on the endpoint you choose.

Use it when you need to bootstrap a GraphQL schema from an existing payload shape, turn sample responses into a starting schema, or generate a schema artifact for internal tooling. The conversion endpoints accept a non-empty JSON object for raw input, or a JSON file/URL that resolves to a JSON document. File-based endpoints require `application/json` and a non-empty JSON object.

The outputs are simple and explicit: inline endpoints return the SDL as a string, file endpoints return a downloadable GraphQL SDL file, and URL endpoints return an object with a `data` field containing a pre-signed S3 URL. That makes it easy to wire the result into build steps, schema review flows, or automated code generation.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyverse.com/apyhub/service/convert-json-to-graphql-sdl
