Create container
containers.create(**kwargs) -> ContainerCreateResponse { id, created_at, name, 6 more }
POST/containers
Create Container
Create container
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
container = openai.containers.create(name: "name")
puts(container){
"id": "cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591",
"object": "container",
"created_at": 1747857508,
"status": "running",
"expires_after": {
"anchor": "last_active_at",
"minutes": 20
},
"last_active_at": 1747857508,
"network_policy": {
"type": "allowlist",
"allowed_domains": ["api.buildkite.com"]
},
"memory_limit": "4g",
"name": "My Container"
}
Returns Examples
{
"id": "cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591",
"object": "container",
"created_at": 1747857508,
"status": "running",
"expires_after": {
"anchor": "last_active_at",
"minutes": 20
},
"last_active_at": 1747857508,
"network_policy": {
"type": "allowlist",
"allowed_domains": ["api.buildkite.com"]
},
"memory_limit": "4g",
"name": "My Container"
}