No logo available for Avatar SDK to DuckDB connector icon

Load Avatar SDK data to DuckDB

Build a Avatar SDK to DuckDB pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Avatar SDK API base URL, auth, endpoints, and incremental loading.

SourceAvatar SDKAvatar SDK API DocumentationDestinationDuckDBIn-process analytical database. The default local destination for dlt pipelines.

Avatar SDK is a REST API that processes photos to generate 3D avatars in formats like GLB and FBX. Everything needed to build a working Avatar SDK → DuckDB pipeline is on this page: the API's base URL, authentication, endpoints, pagination and incremental field — plus a prompt that hands the whole job to your coding agent.


Build your Avatar SDK to DuckDB pipeline

Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.

Prompt
Run uvx dlthub-init@latest to build a pipeline from Avatar SDK to DuckDB and run it on dltHub

That scaffolds a dltHub workspace and installs the dltHub AI harness — the project rules, the secrets-management skill, and the dlt MCP server your agent needs to work safely. From there it reads the Avatar SDK API, proposes the endpoints to load, then writes, runs and validates the pipeline while you review rather than type. Credentials are inspected through MCP tools, so your agent never reads secrets.toml itself. How the LLM-native workflow works →

Prefer to write it yourself? Every fact the agent uses is below.


Avatar SDK API at a glance

Base URLhttps://api.avatarsdk.com/
Example endpointGET avatars/
Authenticationrequests require an OAuth 2.0 Bearer token — sent in the Authorization header, prefixed Bearer
Also requiredX-PlayerUID
PaginationPage-number via page, next cursor at none, page size via none (default 100, max 100). Pagination uses the 'page' query parameter in request URLs (example: /avatars/?page=3). Next/prev/first/last page URLs are provided via the Link HTTP header (if no other pages, Link header is absent). The documentation states up to 100 objects per page; it does not document a separate page-size/limit parameter.
Incremental fieldbefore_date
API referencehttps://api.avatarsdk.com/

These values come from the Avatar SDK API reference — the authoritative source if anything here looks out of date.


How do I authenticate with the Avatar SDK API?

The API uses OAuth 2.0 with the client_credentials grant type to obtain an access token. Subsequent requests require an 'Authorization' header with the value 'Bearer <access_token>'.

1. Get your credentials

  1. Navigate to the Avatar SDK developer portal at https://accounts.avatarsdk.com/developer/ and sign in or create an account. 2. Create a new application and ensure the 'Authorization Grant' type is set to 'Client credentials'. 3. Once created, copy the generated 'Client ID' and 'Client Secret' from your application's dashboard. 4. Use these credentials to authenticate via the token endpoint (https://api.avatarsdk.com/o/token/) to receive an OAuth 2.0 access token (Bearer token).

2. Add them to .dlt/secrets.toml

[sources.avatar_sdk_source] avatar_sdk_client_id = "your_client_id_here" avatar_sdk_client_secret = "your_client_secret_here"

dlt reads this file automatically at runtime. With the harness, the setup-secrets skill prompts you for the values and never handles the raw credential in chat. For production, see setting up credentials with dlt.


What Avatar SDK data can I load into DuckDB?

These are the Avatar SDK endpoints dlt can load into DuckDB:

ResourceEndpointMethodData selectorDescription
avatars/avatars/GETList avatars
avatar_details/avatars/{code}/GETRetrieve avatar details
pipelines/parameters/available/{pipeline}/GETRetrieve available parameters
static_resources/static_resources/{pipeline}/GETList static resources
avatar_exports/avatars/{code}/exports/GETList avatar exports

How do I load only new Avatar SDK records?

Avatar SDK exposes before_date on avatars/, so dlt can request only the records that changed since the last run. Set it as the cursor_path and dlt tracks the high-water mark for you between runs.

{"name": "avatars", "endpoint": { "path": "avatars/", "incremental": {"cursor_path": "before_date", "initial_value": "2024-01-01T00:00:00Z"}, }}

On the first run dlt loads everything from initial_value; on every run after that it requests only what changed and appends with write_disposition="merge" if you set a primary key. See incremental loading.


What does the generated Avatar SDK pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading https://api.avatarsdk.com/o/token/ and https://api.avatarsdk.com/avatars/ from the Avatar SDK API into DuckDB:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def avatar_sdk_source(client_id_client_secret=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://api.avatarsdk.com/", "auth": {"type": "bearer", "token": client_id_client_secret}, }, "resources": [ {"name": "avatars", "endpoint": {"path": "avatars/"}}, {"name": "static_resources", "endpoint": {"path": "static_resources/{pipeline}/"}} ], } yield from rest_api_resources(config) def load_avatar_sdk_to_duckdb() -> None: pipeline = dlt.pipeline( pipeline_name="avatar_sdk_pipeline", destination="duckdb", dataset_name="avatar_sdk_data", ) load_info = pipeline.run(avatar_sdk_source()) print(load_info) if __name__ == "__main__": load_avatar_sdk_to_duckdb()

Run it with python avatar_sdk_pipeline.py. The agent iterates on this until it loads cleanly — you review and approve, rather than write it from scratch.


How do I query Avatar SDK data in DuckDB?

dlt creates one table per resource. Query the loaded data with Python or SQL — or ask your agent to, through the MCP server's execute_sql_query tool.

Python (pandas DataFrame):

import dlt data = dlt.pipeline("avatar_sdk_pipeline").dataset() df = data.avatars.df() print(df.head())

SQL:

SELECT * FROM avatar_sdk_data.avatars LIMIT 10;

See querying your data with dataset and exploring it in marimo notebooks.


How do I deploy the Avatar SDK to DuckDB pipeline in production?

The pipeline runs locally, which is ideal for prototyping and one-off analysis. When you need it on a schedule, monitored on every load, and shared with your team, deploy the same dlt code on the dltHub platform — no infrastructure to maintain. The prompt above already ends with "run it on dltHub", so your agent can take it there directly.

  • Deploy & schedule — run the pipeline as a managed job with automatic retries.
  • Monitor — observable job queues, alerting, and load metrics for every run.
  • Transform — promote raw Avatar SDK loads into governed, documented models.
  • Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.

Book a demo →


What other destinations can I load Avatar SDK data to?

dlt loads into any of these — only the destination argument changes:

DestinationExample value
PostgreSQL"postgres"
BigQuery"bigquery"
Snowflake"snowflake"
Redshift"redshift"
Databricks"databricks"
Filesystem (S3, GCS, Azure)"filesystem"

Set dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. On the dltHub platform the same pipeline runs against a managed Iceberg lakehouse. See the full destinations list.


Next steps

Was this page helpful?

Community Hub

Need more dlt context for Avatar SDK to DuckDB?

Request dlt skills, commands, AGENT.md files, and AI-native context.