Skip to the page
Tecyfy

How to become an AI engineer: the job, and your setup for GenAI development

An AI engineer builds software on top of large language models that someone else trained, reached through an API. The model call is the easy part; the job is everything around it: what goes into the prompt, which documents to look up, which tools the model may use, how to measure whether answers are right, how to keep it safe and what it costs. To start, you need Python 3.10 or later, an API key with a spend limit you set yourself, and a few hours of practice making calls.

Module 0: Start here: what an AI engineer builds

At the end you can:

  • Say what an AI engineer builds, and how the work differs from ML engineering and data science
  • Set up Python and a project folder for the course
  • Create an API key, keep it out of your code, and cap what it can spend
  • Check the whole setup with one script, and read what a call cost
  • Set up a coding agent with project instructions, and use it without handing it your learning

Take this module into your AI

Open in ChatGPT (new tab)Open in Claude (new tab)

This module answers 2 questions before any code: what the job is, and what you need on your computer to learn it. At the end you will have a project folder, an API key that cannot spend more than you allow, a coding agent that knows your project's rules, and a script that proves all 3 work.

What an AI engineer builds

An AI engineer builds software on top of a large language modelLarge Language ModelA model trained on a huge amount of text to predict the next token. Further training turns it into an assistant that follows instructions. that someone else trained. You reach the model through an API, the way you would reach a payments or maps service: send text, get text back, pay for what you used.

Making that call takes a few lines. The job is everything around it:

  • What the model sees. The instructions, the conversation so far, and the documents or records it needs to answer, chosen and trimmed to fit its context windowContext WindowEverything a model can see at once while it writes an answer, counted in tokens. When the window is full, something has to be left out..
  • What it can do. Tools it may call, such as looking up an order, with rules in code about what each may touch.
  • Whether it is right. A model answers differently each time and can be confidently wrong, so you build an eval setEval SetThe list of test cases an LLM app is graded on after every change. Each case is an input and what a good answer must do, so a score going up or down shows whether the change helped. that measures it on every change.
  • Whether it is safe. Text from strangers can carry instructions, so you limit what an injected or mistaken model can do.
  • What it costs, and how fast it is. Every call is billed by the token and takes seconds, not milliseconds.

A large share of the work is measuring. Ordinary code gives the same answer every time; a model does not, so tests become evals, and logs become traces you read to find out why an answer went wrong.

AI engineer, ML engineer, data scientist

The titles overlap, and the useful line is the API. An ML engineer trains and serves models: data pipelines for training, GPUs, model architecture. A data scientist analyses data and builds models to answer questions about it. An AI engineer mostly builds on models that already exist.

Latent Space's 2023 essay that popularised the title puts it this way: the line is permeable, so AI engineers sometimes fine-tune or host open models (module 10 does both) and researchers build on APIs too, but AI engineers should treat the product's own data and its evals as their job. The same essay noted that tasks which took a research team years in 2013 could be done with API docs in an afternoon in 2023. That is why the job exists: the model is bought, and the product is built around it.

InterviewLLM apps and RAG interview questions for AI Engineer rolesLLM apps and RAG questions for AI Engineer roles, with answers, from easy to hard.

What you need before you start

  • Python you can read and write. Functions, lists and dictionaries, classes at a basic level, installing a package with pip. The course explains everything to do with AI; it does not teach Python itself.
  • A terminal. Running a script, moving between folders, setting an environment variable.
  • JSON and HTTP, roughly. What a request and a response are, and what a status code like 429 means. Module 2 covers the rest.

You do not need machine learning, statistics or the maths of training. Module 1 explains how a model writes an answer at the level an engineer uses every day, and module 7 explains the little statistics an eval needs.

What you build in this course

Every module adds one piece to the same project: the support assistant of a small online shop that sells kitchen equipment. By the end it answers customers from the shop's own help pages with citations, looks up orders, asks a person before any refund, refuses injected instructions and passes its own eval set within a budget.

  • Module 2 writes a script that sorts customer emails and drafts replies, with JSON your code can trust.
  • Module 3 turns its prompts into versioned templates with test cases.
  • Modules 4 and 5 add search over the help pages, then answers with citations that say "I don't know" when the pages do not.
  • Module 6 makes it an agent with tools, a step limit and a person before refunds, shared as an MCP server.
  • Modules 7 and 8 measure it with evals and attack it on purpose.
  • Modules 9 and 10 cut its cost and run an open model yourself.
  • Module 11, the capstone, puts all of it together.

Set up Python and a project folder

You need Python 3.10 or later. Check the version:

python3 --version

If it prints an older version or nothing, install a current Python from python.org or your system's package manager. Then make a folder for the course with its own virtual environment, so its packages stay separate from everything else on your computer:

mkdir shop-assistant && cd shop-assistant
python3 -m venv .venv
source .venv/bin/activate
pip install anthropic pydantic

On Windows, activate it with .venv\Scripts\activate instead. Run the activate line each time you open a new terminal for the course; the prompt shows (.venv) while it is active. Later modules add a few packages, and each one says which.

Get an API key, and cap what it can spend

The examples use the Claude API. Sign in to the Claude Console at platform.claude.com, open the API keys page and select Create key. Give it a name you will recognise, such as "shop-assistant course", choose when it expires, and choose the workspace it belongs to (more on that below). The Console shows the full key, starting with sk-ant-, once only. Copy it then; if you lose it, you create a new one.

Keep the key out of your code. Set it in your terminal:

export ANTHROPIC_API_KEY="sk-ant-..."

The SDK reads ANTHROPIC_API_KEY by itself, so no script in this course contains a key. To avoid typing it each time, put the export line in your shell's startup file (~/.zshrc or ~/.bashrc), which is never part of a project. Never paste a key into a script, a prompt, a notebook you share or a chat. If one does leak, revoke it in the Console at once; deleting it from a file does not help, because it is already known.

Then cap what it can spend, before the first call. Each usage tier has a monthly spend cap ($500 a month on the Start tier), and you can set your own lower limit on the Console's Billing page. Better still, create a workspace just for the course and put your key in it: a workspace can have its own spend limit, while the default workspace cannot. Once usage reaches a limit you set, the API refuses further requests with an error saying you have reached your specified usage limits, instead of spending more. A script that loops by mistake then stops at your limit, not at your tier's.

Other providers work the same way under other names. OpenAI's SDK installs with pip install openai and reads OPENAI_API_KEY; Google's installs with pip install google-genai and reads GEMINI_API_KEY. Every idea in this course carries over to them.

Check that it all works

check.py tests each part in turn: that the key is set, that the API accepts it, which models it can call, and what one small call costs. Listing the models uses no tokens, so it is a free test of the key; the call itself uses Claude Haiku 5.5, the smallest current model:

"""Check the setup: the key works, which models it can call, and what one small call costs."""
import os

import anthropic

MODEL = "claude-haiku-5-5"
PRICES = {"claude-haiku-5-5": (0.10, 0.50)}  # dollars per million input and output tokens, from the price page

if not os.environ.get("ANTHROPIC_API_KEY"):
    raise SystemExit("ANTHROPIC_API_KEY is not set in this terminal. Export it, then run this again.")
client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY from the environment

try:
    for model in client.models.list():  # costs no tokens: a free test of the key
        print(f"{model.id:<20} {model.display_name}")
except anthropic.AuthenticationError:
    raise SystemExit("The API key was refused. Check ANTHROPIC_API_KEY, or create a new key in the Console.")
except anthropic.APIConnectionError:
    raise SystemExit("Could not reach the API. Check your internet connection or proxy.")

response = client.messages.create(
    model=MODEL,
    max_tokens=200,
    messages=[{"role": "user", "content": "In one sentence, what does an AI engineer do?"}],
)
print()
print(next(block.text for block in response.content if block.type == "text"))

input_price, output_price = PRICES[MODEL]
usage = response.usage
cost = (usage.input_tokens * input_price + usage.output_tokens * output_price) / 1_000_000
print(f"{usage.input_tokens} tokens in, {usage.output_tokens} out, ${cost:.6f}")

Run it with python check.py. It prints the models your key can use, a one-sentence answer, and the call's tokens and cost, a small fraction of a cent. Each failure gets its own message: no key in this terminal, a key the API refuses, or no connection. If you see one, fix that part before going on. The price comes from the model's price page; module 2 explains every number in the response.

ToolToken counterHow many tokens your text is, on every model

A coding agent as your pair

A coding agent is a model that works in your project: it reads files, runs commands and edits code, asking before it changes anything. Working with one is now part of the job, and it is a good teacher if you use it as one. The course's examples use Claude Code; others work the same way.

GuideClaude Code: Install and sign inInstall Claude Code with one command (curl -fsSL https://claude.ai/install.sh | bash on Mac and Linux, irm https://claude.ai/install.ps1 | iex in Windows…

Give it the project's rules in a CLAUDE.md file at the top of the folder. Claude Code reads it at the start of every session, so you write the rules once:

# Shop assistant

The support assistant for a small kitchen shop, built module by module in the Tecyfy AI engineering course.

## Commands
- `source .venv/bin/activate` before anything else
- `python check.py` checks the API key and the setup

## Rules
- Never write an API key into a file. The SDK reads ANTHROPIC_API_KEY from the environment.
- Every script that calls a model prints what its calls cost.
- Explain what you change and why. I am learning, so do not rewrite a file I wrote unless I ask.
GuideClaude Code: CLAUDE.md and memoryCLAUDE.md is a Markdown file of instructions that Claude Code reads at the start of every session. Put one at the root of your repository with your build and…

How to use it while learning:

  • Type the module's code yourself first, or at least read it line by line. Then ask the agent to explain anything you could not.
  • Ask it to break things. "Make the API return a rate limit error and show what my script does" teaches more than a working run.
  • Read every change it makes, and run it. Working code you cannot explain is the agent's skill, not yours.
  • Keep it in a safe mode. Let it ask before running commands or editing files, and never let it read your shell's startup file where the key lives. The settings builder writes the permission rules for you.
ToolClaude Code settings builderPermission rules, the starting mode, hooks, MCP servers and a CLAUDE.md for your project, ready to copy.

Build it: the project folder

Your project now has everything the later modules build on:

shop-assistant/
  .venv/          the virtual environment (never committed)
  .gitignore      .venv/, __pycache__/, *.db and .env
  CLAUDE.md       the project's rules for the coding agent
  check.py        checks the key, the models and the cost of one call

Create the .gitignore so nothing private ends up in version control:

.venv/
__pycache__/
*.db
.env

Then run the check. With a working key it prints something like this (the answer's wording and the token counts will differ):

$ python check.py
claude-opus-5-5      Claude Opus 5.5
claude-sonnet-5-5    Claude Sonnet 5.5
claude-haiku-5-5     Claude Haiku 5.5

An AI engineer builds software on top of language models: the prompts, retrieval, tools, evals and safeguards around the model call.
1200 tokens in, 400 out, $0.000320

The list is longer with a real key; the output above is from a stand-in for the API that every script in this course is first run against, which is why its token counts are round. Before you move on, open the Console's Billing page once more and confirm the spend limit is there. Module 1 explains what happened inside the model to write that sentence, and module 2 turns the call into something your code can rely on.

Check yourself

3 questions, each in a new situation

  1. 1. You put your API key in check.py so you do not have to export it each time, and push the project to a public GitHub repository. What is the right first step when you notice?

  2. 2. You want this course to cost you no more than you planned, even if a script loops by mistake. What does that?

  3. 3. You ask your coding agent to write the module's eval script, and it works first time. What makes sure you still learn what the module teaches?

The course page marks it, in this browser only.

Questions

What does an AI engineer do?
An AI engineer builds products on top of large language models made by someone else, such as Claude, GPT or Gemini, reached through an API. The work is the system around the model call, such as the prompts and context, retrieval from documents, tools the model can use, evals that measure answers, safety checks, cost and monitoring.
What is the difference between an AI engineer and an ML engineer?
An ML engineer trains and serves models. An AI engineer mostly builds on models that already exist, through an API, and treats the product's data and its evals as the core of the job. The line is loose; AI engineers sometimes fine-tune or host open models, and ML engineers build on APIs too.
Do I need to know machine learning or maths to become an AI engineer?
No, not to start. You need to write ordinary Python, use a terminal, read JSON and understand roughly how an HTTP API works. How models work matters (module 1 explains what you need), but you do not train one, and the maths of training is not part of the daily work.
How do I get a Claude API key?
Sign in to the Claude Console at platform.claude.com, open the API keys page, select Create key, name it and choose its expiry and workspace. The key starts with sk-ant- and is shown only once, so copy it then. Set it as the ANTHROPIC_API_KEY environment variable, which the SDK reads by itself.
How much does it cost to learn AI engineering with an API?
You pay per token, so the bill depends on the model and how much you run. Every script in this course prints what its calls cost. Set a spend limit on the Console's Billing page before you start, below your tier's monthly cap; a request over it fails with an error instead of spending more.

Sources

Where each fact comes from

  1. 1The Rise of the AI Engineer
  2. 2Get started with Claude
  3. 3Get your Claude API key
  4. 4Rate limits
  5. 5List Models
  6. 6Developer quickstart
  7. 7Gemini API quickstart