Skip to content

Write real AI code.
Run it for free.

Call real AI models from Python with the same code developers use at work. Credits come with every Trace account. Trace checks each message before a model sees it.

  • 2,000 free credits a month
  • No credit card needed
  • Personal details removed

Pick a message, then press Run it.

Run a model call

Requests use your Trace account limits

Pick a message

from trace_sdk import Trace

client = Trace()

reply = client.chat.completions.create(
    messages=[
        {"role": "user",
         "content": "Say hello in three words."},
    ],
)

print(reply.text)

reply.text

Run the call to see what comes back.
credits_spent —balance 2000.0

Three commands to a first reply.

It takes a few minutes on a computer with Python 3.10 or newer. No AI company account. No credit card.
hello.py
1from trace_sdk import Trace2 3client = Trace()4 5completion = client.chat.completions.create(6    messages=[{"role": "user", "content": "Say hello in three words."}],7)8 9print(completion.choices[0].message.content)
Terminal
$ pip install trace-edu-sdkSuccessfully installed trace-edu-sdk $ trace loginYour login code:  Q4EB-FUD7Waiting for you to approve…Signed in. Key saved to ~/.trace/credentials.json $ python hello.pyHello there, friend!
  1. Install

    One package adds the Trace library and the trace command.

    pip install trace-edu-sdk
  2. Sign in

    Match the code in the browser and approve. The key stays on the student's computer.

    trace login
  3. Run

    Send a message to a model and print what it says back.

    python hello.py

Start from a program that works.

Each kind of call comes as a short example. Copy one, change a line, and run it again.

A worked example for every call

Copy one, change a line, run it

Ask a question, read the answer.

from trace_sdk import Trace

client = Trace()

reply = client.chat.completions.create(
    messages=[{"role": "user", "content": "Say hello in three words."}],
)

print(reply.text)
  • Chat

    A study buddy that answers questions.

  • Streaming

    A reply that appears word by word.

  • Tool calling

    A helper that uses a calculator.

  • Embeddings

    A search over a class's notes.

For parents and teachers

What happens to a student's message.

Students never get a key to an AI company's account. Each message goes through Trace on the way to the model and on the way back.

Send a message through Trace

What a student types, and what a model is allowed to see

What the student typed

Hi, I'm Priya Nair and my email is [email protected]. Can you check my essay?

  • Personal details removed

    The student's own name, plus emails, phone numbers, addresses, and ID numbers in what they type, are stripped server-side.

  • Model is on the approved list

    The request can only reach a model that has been reviewed for classroom use.

  • Token and credit ceiling applied

    A per-request cap keeps each call small.

What the model received

Send the message to see what leaves Trace.

  • Details come out

    Names, emails, phone numbers, and addresses are removed first.

  • Approved models

    Only AI models approved for classrooms can answer.

  • Both sides checked

    A safety check reads the message and the reply.

  • Not for training

    Student work is never sold or used to train AI.

Credits come with the account.

Every account gets 2,000 credits a month. A short question costs a fraction of a cent, so a student can try things all month.

Spend from your balance

A free account starts here every month

Credits left$2.00 of value

2000.0

One credit is a tenth of a cent of model cost, and a short question uses a fraction of one. The balance resets each month, and unused credits don't carry over.

Try a call

  • 2,000 a month

    On every free account, with no card.

  • Stops at zero

    When credits run out, calls stop until next month.

  • Easy to check

    Run trace credits, or open the account page.

  • Coming next

    Real datasets to train on, and shared benchmarks to score the results.

What's in the package.

What a student or teacher needs to know before writing the first line.
  • Language

    Python 3.10 or newer. The package depends only on httpx.

  • Code style

    The same as OpenAI's Python library, so examples from elsewhere work after a small change.

  • Calls

    Chat, streaming, tool calling, and embeddings.

  • Models

    The chat models approved for the Builder, plus one embedding model. client.models.list() shows them.

  • Speed limit

    30 requests a minute per key.

  • Reply length

    Up to 4,000 tokens per request. A request that doesn't set a limit gets 512.

  • Keys

    trace login saves a key on the student's computer. A key can be turned off from the account page at any time.

Questions from students, parents, and teachers

Three commands to your first model call.

A free account includes 2,000 credits a month. No card needed.