Responses API Container Duration Metrics

Given the following email, is there an effort to enhance the Responses API to include container duration metrics? It sure would be helpful.

We recently launched an upgraded shell tool and improvements to our hosted containers, including support for controlled network access. The shell tool is a more powerful evolution of Code Interpreter, and we encourage you to migrate to it.

As part of these upgrades, hosted containers can now do more sophisticated work — including installing libraries over the internet, running code in multiple programming languages, and supporting more complex agent workflows. Given this expanded capability, pricing for container usage is changing.

Starting March 31, container usage will be billed in 20-minute increments (per container):

  • 1 GB (default): $0.03 per 20 minutes, per container

  • 4 GB: $0.12 per 20 minutes, per container

  • 16 GB: $0.48 per 20 minutes, per container

  • 64 GB: $1.92 per 20 minutes, per container

How this affects your total cost will depend on your usage patterns (e.g., how long your container sessions run). Rest assured that until March 31, pricing remains the same as current pricing.

Thanks,

The OpenAI Team

2 Likes

This sounds like “we found that developers were keeping their container from expiring and we found a way to bill for that”

They already figured how to increase your usage:

code_interpreter and shell with an OpenAI-managed container cannot be used together at the same time.

The containers API endpoint should be able to furnish you created and active time:

{
    "id": "cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863",
    "object": "container",
    "created_at": 1747844794,
    "status": "running",
    "expires_after": {
        "anchor": "last_active_at",
        "minutes": 20
    },
    "last_active_at": 1747844794,
    "memory_limit": "4g",
    "name": "My Container"
}

Then the billing seems really sketch - because if you touch the container even once, then you’ve advanced the “expires” so that it had ran over 20 minutes, magic double-bill if you don’t delete it.

$64.80 monthly bill to keep one alive.

I just went through another code change session to deal with this and finally decided to not share sessions to save .03/session, provided my sessions can shoe-horn into a 20 min slot, and just create a new session. My use case doesn’t really need a session to persist for a long time; just generate something that needs a CI session and let me download it. But, this billing change is somewhat annoying. And maybe there’s something else subtle that will bump CI session usage charges that I don’t see right now. But if someone has a constant session active for 30 days, yes you are correct; their charges just tripled.

I was just billed $50 for running tests against the containers endpoint, so I agree this warrants closer attention. I have only myself to blame, but it is not ideal to burn through a development budget this quickly.

What specific features or controls would you like to see added to better manage usage and costs?