Skip to main content

Prerequisites

  • An OpenReward account
  • An OpenReward API key
  • An API key and SDK for your model provider of choice (e.g. OpenAI, Anthropic, Google, OpenRouter)

Sample an Environment

In this example we’ll call the GeneralReasoning/CTF environment on OpenReward and sample an agent trace using the Python SDK. This environment is publicly hosted on OpenReward - i.e. you will be accessing it through the cloud, not locally. Choose a model provider below and sample your first environment!
1

Set your API keys

Make sure you have API keys for OpenReward and OpenAI, and set these as environment variables:
2

Install the SDK

3

Create your code

Save this as quickstart.py:
4

Run your code

Example output:

Next steps

Now that you know how to sample from OpenReward environments, explore these key features:

Evaluate with OpenReward

Learn how to run evals with OpenReward

Build with OpenReward

Build your first environment

Using the AsyncClient

Getting the most out of OpenReward