﻿---
title: "通过 OpenAI 数据驻留端点 连接模型服务"
filename: "~/.codex/openaidr.config.toml"
canonical: /templates/openaidr-codex-gateway/
---

# 通过 OpenAI 数据驻留端点 连接模型服务

用户层 [model_providers.openaidr]，base_url 用驻留前缀如 https://us.api.openai.com/v1，wire_api = responses。再用 ~/.codex/openaidr.config.toml 和 --profile openaidr。

```
model_provider = "openaidr"

[model_providers.openaidr]
name = "OpenAI Data Residency"
base_url = "https://us.api.openai.com/v1"
wire_api = "responses"

```
