A beginner's guide to

Creative AI Coding

Teach a model to do something odd, then make art or toys out of the result. Writing small programs that use machine-learning models to make images, text, sound or interactive pieces, from a first webcam experiment to your own sketches.

Guide updated 31 October 2026

Start here ↓
Start-up costFree–£20
Best settingComputer
FeelsCurious
PopularityVery popular
CostFree/very low
DifficultyModerate
Time needed30 minutes
Physical effortVery low
Social levelOptional
⌨️

Start this hobby

Your first practical checklist

01

Buy or borrow

A laptop with a modern browser. Browser-based tools such as the p5.js web editor and ml5.js run without installing anything and work on an ordinary laptop

02

First 30 minutes

Run a ready-made example in the p5.js web editor, for example a webcam-based pose or hand tracker from the ml5.js examples, and change one colour or shape.

03

First week goal

Combine the pieces into one small interactive sketch, such as moving a shape with your hand, and share a screen recording with a note on how it works.

04

Avoid this mistake

Committing an API key to a public repository exposes your account, so store keys in an environment variable or an ignored config file.

Is this for me?

A quick fit check

Good signs

  • You enjoy trying odd ideas on a laptop, such as making a webcam change a drawing as you move.
  • You are comfortable with unpredictable results, because the same prompt or model can give different outputs each time.
  • You like making things you can show people, like a small interactive sketch, rather than reading theory first.

Think twice if

  • You need basic coding skills, such as variables and functions in JavaScript or Python, before most examples make sense.
  • Hosted models can charge by usage, so you must set limits and watch your spending.
  • Tools change quickly, so tutorials can break or become out of date, which means a lot of fixing and searching.

Make creative AI coding easier

Start in the p5.js web editor with a ready-made ml5.js example and change one thing at a time. You need no installation, no account and no cost, and you will see a result within minutes.

First session

What to do in the first 30 minutes

0–5 min

Open the p5.js web editor and load an ml5.js webcam example, such as pose or hand tracking, and allow the camera in the browser.

5–15 min

Run it and change one colour, size or shape, noting what each change does in a text file.

15–25 min

Make a shape follow your wrist or fingertip using the coordinates the model gives you.

25–30 min

Save the sketch, write down what you would like to try next, and take a short screen recording to look back on.

The appeal · Digital practice

Why try creative AI coding?

Creative AI coding means writing code that calls or runs machine-learning models for expressive ends: poetry generators, image tools, gesture-controlled visuals, or sound that reacts to your voice. It sits between creative coding (you write the rules by hand) and ordinary machine-learning engineering (the aim is accuracy, not interest), and you can start in the browser with libraries such as ml5.js or by calling a hosted model. Most people move from running other people's models to training small ones on their own data, then to combining models with sketches, installations or games.

✦

Quick, surprising results

A few lines of code can give you a sketch that responds to your hand or voice, so you see progress straight away.

✦

A way to learn how models work

Training a small classifier on your own examples shows how data and results are connected.

✦

Something to share

Interactive sketches and images are easy to show on a screen or send as a link.

Keep it simple

What you need to begin

  • A laptop with a modern browserBrowser-based tools such as the p5.js web editor and ml5.js run without installing anything and work on an ordinary laptop
  • A webcam or microphoneThe one built into most laptops is enough for pose, hand and sound experiments
  • A free account with a hosted model serviceFree tiers are fine for testing; set a spending limit before adding a card, as usage-based pricing can rise quickly
  • A notebook or text file of prompts and resultsKeep a short log of what you tried and what the model returned, since outputs vary and you will want to repeat good ones

The fundamentals

Four skills to build

01

Running and editing examples

Changing a working sketch one line at a time shows you what each part does, and is the fastest way to learn.

02

Calling a model from code

Sending a request to a hosted model and showing its reply teaches you about inputs, outputs and asynchronous code.

03

Preparing training data

A small, balanced set of clear examples makes a better classifier than a large messy one, and learning to collect it matters.

04

Mapping output to something you can see or hear

Turning a model's number or label into position, colour or sound is where the creative decisions are.

Software deep dive

Creative AI Coding: zero to professional

Programming is the practice of turning a messy human problem into small, testable instructions. In 2026, AI assistants can speed up syntax and boilerplate, but beginners still need fundamentals: reading errors, tracing data, using Git and finishing small projects.

Fresh context

What to know now

  • ↳Use AI as a reviewer and explainer, not as the only author. You still need to understand every file you ship.
  • ↳Old single-purpose starter tools age quickly. Prefer official docs, small vanilla projects, or maintained framework starters.
  • ↳Employers and serious collaborators care about proof: deployed projects, readable commits, tests, issue notes and clear explanations of trade-offs.

Start with the right route

Common options and trade-offs

Web path

HTML, CSS and JavaScript give fast visual feedback and teach the browser platform beneath React, Vue, Svelte and every website builder.

Know the trade-offFrameworks help later, but they hide useful basics if you start too early.

Python path

Strong for automation, data, scraping your own data, command-line tools and backend services. The official tutorial is current and well maintained.

Know the trade-offPackaging desktop apps or mobile apps takes extra learning.

JavaScript/TypeScript app path

Good for full-stack apps because one language can cover browser, server, testing and tooling.

Know the trade-offThe ecosystem changes quickly; keep dependencies minimal until the product shape is clear.

A practical setup

Common tools and what each one does

ToolPurposeBeginner advice
VS Code, Zed or another editorWrite and navigate code

Pick one editor and learn search, multi-file replace, terminal, debugger and extensions slowly.

TerminalRun project commands

Learn folders, paths, environment variables, package scripts and how to read exit errors.

GitVersion control

Commit small working checkpoints with messages that explain why, not just what.

GitHub or GitLabRemote repo and collaboration

Use issues, pull requests and CI even for solo projects once the basics work.

Node.js or PythonRun code and install packages

Choose the runtime your project needs; avoid installing every tool mentioned in tutorials.

Test runnerCheck behaviour automatically

Start with a few tests for important functions and previous bugs before chasing full coverage.

Do not skip levels

A five-stage learning roadmap

1
Foundation

Learn files, terminal navigation, variables, functions, conditionals, loops and reading stack traces.

Proof you are ready to move on: Build a calculator, text formatter or static page without copying a full tutorial.

2
Working beginner

Handle user input, arrays or objects, modules, DOM events or files, and basic Git branching.

Proof you are ready to move on: Build a searchable list, quiz, simple API client or useful automation script.

3
Intermediate

Use persistent storage, validation, async code, APIs, authentication basics and automated tests.

Proof you are ready to move on: Ship a tracker with create, edit, delete, empty states, errors and a deploy URL.

4
Advanced

Study architecture, databases, accessibility, security, performance budgets and operational monitoring.

Proof you are ready to move on: Run a small multi-user app with backups, logs, migrations and rollback notes.

5
Professional

Practise code review, issue breakdown, debugging production failures and documenting decisions.

Proof you are ready to move on: Maintain a project used by real people and show how feedback changed it.

How real work gets done

A professional workflow

Use the same sequence on small personal projects that you would use on serious work. The scale changes; the discipline does not.

  1. Write the user problem, constraints and one measurable success condition.
  2. Sketch data, screens and failure states before choosing libraries.
  3. Build the thinnest complete version that runs end to end.
  4. Commit after each working change and keep a readable project log.
  5. Test expected, empty, invalid, slow and failure states.
  6. Deploy, observe real behaviour and document the next decision.

Build evidence, not tutorial history

Three portfolio milestones

Beginner

Tiny personal utility

A script or page that solves one annoyance you actually have.

Intermediate

Local-first tracker

Structured data, filtering, validation, persistence, tests and responsive layout.

Advanced

Production service

Accounts, database migrations, permissions, observability, backups and a deployment pipeline.

The difference at professional level

Habits that make work trustworthy

  • ✓Name variables and functions for their purpose, not their implementation.
  • ✓Keep changes small enough to review and revert.
  • ✓Write tests around important behaviour and past bugs.
  • ✓Treat accessibility, security and error handling as requirements.
  • ✓Document setup, architecture decisions and operational steps.
  • ✓Measure before optimising and verify after deployment.

Words you will encounter

Essential vocabulary

Repository
A project and its version history, usually managed by Git.
API
A defined way for one piece of software to request data or behaviour from another.
Runtime
The program or environment that executes code, such as a browser, Node.js or Python.
Dependency
External code a project relies on; dependencies must be updated and reviewed.
Framework
A structured set of tools and conventions that controls part of an application's architecture.
Deployment
The repeatable process that releases a tested version for people to use.

Continue with primary sources

Official learning resources

Documentation is a working tool, not something to read once from beginning to end. Follow one structured introduction, then return with specific questions from a project.

Four small steps

Your first week

  1. Run a ready-made example in the p5.js web editor, for example a webcam-based pose or hand tracker from the ml5.js examples, and change one colour or shape.
  2. Write a short script that sends a prompt to a text model and displays the reply on a canvas, with a few different prompts to compare results.
  3. Train a small image or sound classifier with a browser tool such as Teachable Machine on three of your own classes and trigger different visuals for each.
  4. Combine the pieces into one small interactive sketch, such as moving a shape with your hand, and share a screen recording with a note on how it works.

The longer path

How progress usually looks

For creative ai coding, a sustainable rhythm is one or two evening sessions a week of 45–60 minutes, saving every experiment in a single folder. Move forward when the current step feels repeatable, not merely possible once.

1

Running examples

You run ready-made sketches and change their colours, shapes and text.

2

Training your own model

You train a small classifier on your own images, poses or sounds and trigger different visuals from it.

3

Combining pieces

You combine a model with a sketch, such as hand tracking controlling generated text or visuals, and handle errors and delays.

4

A finished piece

You finish a project such as an interactive piece or small installation, document how it works and share it online or at a meetup.

Progress markers

What improvement looks like

Beginner

You run ready-made sketches and change their colours, shapes and text.

Intermediate

You combine a model with a sketch, such as hand tracking controlling generated text or visuals, and handle errors and delays.

Confident

You finish a project such as an interactive piece or small installation, document how it works and share it online or at a meetup.

Spend deliberately

A realistic cost plan

The headline starting range is Free–£20, but access, borrowing and second-hand equipment can change that substantially.

Try it£0A laptop, a browser, the p5.js web editor, ml5.js examples and Teachable Machine.
Get going£0–£10Free tiers of hosted models, a small domain or hosting for sharing sketches, and a webcam if yours is poor.
Later£20+Paid API usage with a spending limit, cloud computing time for training and any sensors or displays for installations.

Learn with other people

Community and safety

☺

Finding your people

Creative coding meetups, makerspaces and university or library workshops are good places to meet people, and the p5.js and Processing communities are friendly online. Sharing sketches in forums and at events gives feedback and ideas.

+

Safety note

Keep API keys out of code you share, set a spending limit before adding a card, and only use photos, voices and recordings of people who have agreed. Check the licence for models and data sets, and check model output before showing it publicly, as it can be wrong or offensive.

Three common beginner mistakes

  • Committing an API key to a public repository exposes your account, so store keys in an environment variable or an ignored config file.
  • Training on too few or unbalanced examples gives erratic results, so collect several varied samples of each class and test with new ones.
  • Not logging prompts and settings means you cannot reproduce a good result, so save the prompt, model and settings next to each output.

Good to know

One tip worth keeping

From the HobbyWiki notebook

Never paste an API key into code you share or publish online; keep it in an environment variable or ignored config file. Only use photos, voices and recordings of people who have agreed, and check the licence of any model or data set before you publish what you make.

Find your angle

Useful searches from here

Before you begin

Common questions

Do I need to know machine learning to start?+

No. Browser tools like ml5.js and Teachable Machine let you use and train models without any maths, and you can learn the theory as you go.

Which programming language should I use?+

JavaScript with p5.js is easiest for a beginner because it runs in the browser and shows results immediately. Python is a common next step for working with more models.

What is the difference between creative coding and creative AI coding?+

Creative coding is writing the rules yourself, while creative AI coding uses a trained model as part of the piece. Many projects mix both.

Will I need an expensive computer?+

No, an ordinary laptop is enough for browser-based models and hosted services. Training large models needs more power, but you can rent that later.

Can I sell or publish what I make?+

It depends on the licences of the model and any data you used, so check them before you publish. Always get permission before using other people's photos or voices.