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

# Quickstart

> Call the Neural4D API with a Bearer token and follow the async result workflow.

This page covers the minimum request flow. You submit a create request, keep the returned `uuid`, and then query the result or download the generated asset.

## Prerequisites

* You already have a valid `Bearer token` from the Neural4D website.
* You can send HTTP requests with `curl`, Postman, or your own client.
* For upload endpoints, you already have image files that meet the documented limits.

## Request flow

<Steps>
  <Step title="Set the auth header">
    Every endpoint uses `Authorization: Bearer <token>`.

    ```bash theme={null}
    curl --header "Authorization: Bearer YOUR_TOKEN"
    ```
  </Step>

  <Step title="Submit a create request">
    Start with a simple create endpoint such as `POST /api/generateModelWithText`.

    <CodeGroup>
      ```bash cURL theme={null}
      curl --location 'https://alb.neural4d.com:3000/api/generateModelWithText' \
        --header 'Content-Type: application/json;charset=utf-8' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --data '{
          "prompt": "a cute bird",
          "modelCount": 1,
          "disablePbr": 1
        }'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://alb.neural4d.com:3000/api/generateModelWithText",
          headers={
              "Content-Type": "application/json;charset=utf-8",
              "Authorization": "Bearer YOUR_TOKEN",
          },
          json={"prompt": "a cute bird", "modelCount": 1, "disablePbr": 1},
      )
      print(response.json())
      ```

      ```javascript Node.js theme={null}
      const response = await fetch("https://alb.neural4d.com:3000/api/generateModelWithText", {
        method: "POST",
        headers: {
          "Content-Type": "application/json;charset=utf-8",
          Authorization: "Bearer YOUR_TOKEN",
        },
        body: JSON.stringify({ prompt: "a cute bird", modelCount: 1, disablePbr: 1 }),
      });

      console.log(await response.json());
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "fmt"
          "io"
          "net/http"
      )

      func main() {
          body := []byte(`{"prompt":"a cute bird","modelCount":1,"disablePbr":1}`)
          request, _ := http.NewRequest(
              "POST",
              "https://alb.neural4d.com:3000/api/generateModelWithText",
              bytes.NewReader(body),
          )
          request.Header.Set("Content-Type", "application/json;charset=utf-8")
          request.Header.Set("Authorization", "Bearer YOUR_TOKEN")

          response, _ := http.DefaultClient.Do(request)
          defer response.Body.Close()
          result, _ := io.ReadAll(response.Body)
          fmt.Println(string(result))
      }
      ```

      ```java Java theme={null}
      import java.net.URI;
      import java.net.http.HttpClient;
      import java.net.http.HttpRequest;
      import java.net.http.HttpResponse;

      class Main {
        public static void main(String[] args) throws Exception {
          var request = HttpRequest.newBuilder()
              .uri(URI.create("https://alb.neural4d.com:3000/api/generateModelWithText"))
              .header("Content-Type", "application/json;charset=utf-8")
              .header("Authorization", "Bearer YOUR_TOKEN")
              .POST(HttpRequest.BodyPublishers.ofString(
                  "{\"prompt\":\"a cute bird\",\"modelCount\":1,\"disablePbr\":1}"))
              .build();

          var response = HttpClient.newHttpClient().send(
              request, HttpResponse.BodyHandlers.ofString());
          System.out.println(response.body());
        }
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="Store the uuid">
    Create endpoints usually return `uuid` or `uuids`. Keep them for later result queries and downloads.
  </Step>

  <Step title="Query the result or progress">
    For 3D model tasks, call `POST /api/retrieveModel`. For picture or video tasks, call `POST /api/queryGenerationResult`. You can also call `POST /api/queryJobProgress` for progress polling.

    <CodeGroup>
      ```bash cURL theme={null}
      curl --location 'https://alb.neural4d.com:3000/api/retrieveModel' \
        --header 'Content-Type: application/json;charset=utf-8' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --data '{"uuid":"f47ac10b-58cc-4372-a567-0e02b2c3d479"}'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://alb.neural4d.com:3000/api/retrieveModel",
          headers={
              "Content-Type": "application/json;charset=utf-8",
              "Authorization": "Bearer YOUR_TOKEN",
          },
          json={"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479"},
      )
      print(response.json())
      ```

      ```javascript Node.js theme={null}
      const response = await fetch("https://alb.neural4d.com:3000/api/retrieveModel", {
        method: "POST",
        headers: {
          "Content-Type": "application/json;charset=utf-8",
          Authorization: "Bearer YOUR_TOKEN",
        },
        body: JSON.stringify({ uuid: "f47ac10b-58cc-4372-a567-0e02b2c3d479" }),
      });

      console.log(await response.json());
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "fmt"
          "io"
          "net/http"
      )

      func main() {
          body := []byte(`{"uuid":"f47ac10b-58cc-4372-a567-0e02b2c3d479"}`)
          request, _ := http.NewRequest(
              "POST",
              "https://alb.neural4d.com:3000/api/retrieveModel",
              bytes.NewReader(body),
          )
          request.Header.Set("Content-Type", "application/json;charset=utf-8")
          request.Header.Set("Authorization", "Bearer YOUR_TOKEN")

          response, _ := http.DefaultClient.Do(request)
          defer response.Body.Close()
          result, _ := io.ReadAll(response.Body)
          fmt.Println(string(result))
      }
      ```

      ```java Java theme={null}
      import java.net.URI;
      import java.net.http.HttpClient;
      import java.net.http.HttpRequest;
      import java.net.http.HttpResponse;

      class Main {
        public static void main(String[] args) throws Exception {
          var request = HttpRequest.newBuilder()
              .uri(URI.create("https://alb.neural4d.com:3000/api/retrieveModel"))
              .header("Content-Type", "application/json;charset=utf-8")
              .header("Authorization", "Bearer YOUR_TOKEN")
              .POST(HttpRequest.BodyPublishers.ofString(
                  "{\"uuid\":\"f47ac10b-58cc-4372-a567-0e02b2c3d479\"}"))
              .build();

          var response = HttpClient.newHttpClient().send(
              request, HttpResponse.BodyHandlers.ofString());
          System.out.println(response.body());
        }
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="Download or convert the asset">
    After the model is ready, download it from `modelUrl`. If you need `fbx`, `obj`, `stl`, `blend`, or `usdz`, call `POST /api/convertToFormat`.
  </Step>
</Steps>

## Upload limits

* Upload endpoints support `JPG`, `JPEG`, `PNG`, and `WEBP`
* Recommended resolution range: `256x256` to `6048x8064`
* Recommended file size: under `10 MB`
* Picture and video generation endpoints accept up to `6` reference images
