API class

Core3D API client

Signature:

declare class API 

Remarks

Wraps a typed API client available for arbitrary API and provides a few convenience methods for common operations.

Constructors

Constructor

Modifiers

Description

(constructor)(ctx, data)

API constructor.

Properties

Property

Modifiers

Type

Description

auth

readonly

Readonly<{ me: (options?: FetchInit<{}, "json">) => Promise<FetchResult>; }>

Auth API methods.

ctx

readonly

Context

designs

readonly

Readonly<{ create: (data: any, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.DesignResource>>; }>

Design API methods.

generations

readonly

Readonly<{ create: (data: any, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.GenerationResource>>; }>

materials

readonly

Readonly<{ read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.MaterialResource>>; }>

models

readonly

Readonly<{ links: { list: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelLinkResource[]>>; read: (source: string, target: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelLinkResource>>; }; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.ModelResource>>; }>

static

readonly

Readonly<{ materials: { textures: { read: <TParseAs extends "arrayBuffer" | "blob" = "arrayBuffer" | "blob">(identity: string, filename: `${string}.${("jpg" | "png")}`, options: (Omit<FetchInit<{ force?: boolean; quality?: "0.25k" | "0.5k" | "1k" | "2k" | "4k"; [key: string]: any; }, TParseAs>, "parseAs"> & { parseAs: TParseAs; })) => Promise<FetchResult<{}, TParseAs>>; }; }; }>

uploads

readonly

Readonly<{ create: (data: { file: string | Blob | File; metafields?: APIv1.MetafieldData[]; team?: string; }, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource>>; read: (identity: string, options?: FetchInit<{}, "json">) => Promise<FetchResult<APIv1.UploadResource>>; }>

Methods

Method

Modifiers

Description

fetch(path, init)

A typed fetch handler for API requests.

resolve(urn, options)

Resolve a URI to a resource.

wait(uri, options)

Wait for a resource status to resolve.

Get in touch

We'd love to learn more about your vision and how we can help.

PressPrivacyTermsSupportCopyright © 2025 Core3D, Inc. All Rights Reserved.