Ugrás a fő tartalomhoz

Ezt a böngészőt már nem támogatjuk.

Frissítsen a Microsoft Edge-re, hogy kihasználhassa a legújabb funkciókat, a biztonsági frissítéseket és a technikai támogatást.

A Microsoft Edge letöltése További információk az Internet Explorerről és a Microsoft Edge-ről
microsoft-foundry.rest.security.o-auth2-auth

Containers

Get a container

GET /openai/v1/containers/{container_id}

Retrieves a container by its identifier.

Elérési útvonal paraméterei

container_id string kötelező

The ID of the container.

Válaszok

The request has succeeded.

Törzs

Content-Type: application/json
id string kötelező

Unique identifier for the container.

object string kötelező

The type of this object.

name string kötelező

Name of the container.

created_at integer kötelező

Unix timestamp (in seconds) when the container was created.

status string kötelező

Status of the container (e.g., active, deleted).

last_active_at integer

Unix timestamp (in seconds) when the container was last active.

expires_after OpenAI.ContainerResourceExpiresAfter
anchor enum
last_active_at
minutes integer
memory_limit enum

The memory limit configured for the container.

1g4g16g64g
network_policy disabled | allowlist

Network access policy for the container.

Az alábbiak valamelyikének telepítve kell lennie:
disabled OpenAI.ContainerNetworkPolicyDisabledParam
type enum kötelező

Disable outbound network access. Always disabled.

disabled
allowlist OpenAI.ContainerNetworkPolicyAllowlistParam
type enum kötelező

Allow outbound network access only to specified domains. Always allowlist.

allowlist
allowed_domains string[] kötelező

A list of allowed domains when type is allowlist.

Client error

Törzs

Content-Type: application/json
error OpenAI.Error kötelező
code string | null kötelező
message string kötelező
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
A következők bármelyike:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string kötelező

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Törzs

Content-Type: application/json
error OpenAI.Error kötelező
code string | null kötelező
message string kötelező
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
A következők bármelyike:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string kötelező

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Kérés

curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \
  -H "Authorization: Bearer $OPENAI_API_KEY"
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const container = await client.containers.retrieve('container_id');

console.log(container.id);
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
container = client.containers.retrieve(
    "container_id",
)
print(container.id)
package main

import (
    "context"
    "fmt"

    "github.com/openai/openai-go"
    "github.com/openai/openai-go/option"
)

func main() {
    client := openai.NewClient(
        option.WithAPIKey("My API Key"),
    )
    container, err := client.Containers.Get(context.TODO(), "container_id")
    if err != nil {
        panic(err.Error())
    }
    fmt.Printf("%+v
", container.ID)
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.containers.ContainerRetrieveParams;
import com.openai.models.containers.ContainerRetrieveResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        ContainerRetrieveResponse container = client.containers().retrieve("container_id");
    }
}
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

container = openai.containers.retrieve("container_id")

puts(container)

Válasz

{
    "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"
}
hu-hu
Az Ön adatvédelmi választási lehetőségei
  • AI-jogi nyilatkozat
  • Korábbi verziók
  • Blog
  • Közreműködés
  • Adatvédelem
  • A Consumer Health adatvédelmi nyilatkozata
  • Használati feltételek
  • Védjegyek
  • © Microsoft 2026