SpyBara
Go Premium

Reference 2026-11-18 22:59 UTC to 2026-11-19 22:59 UTC

295 files changed +674 −11,626. View all changes and history on the product overview
2026
Wed 25 23:57 Tue 24 23:00 Sat 21 23:57 Fri 20 23:59 Thu 19 22:59 Wed 18 22:59 Tue 17 22:57 Mon 16 23:00 Fri 13 23:58 Thu 12 22:57 Wed 11 23:57 Tue 10 23:02 Mon 9 23:02 Sat 7 22:59 Fri 6 23:00 Thu 5 23:00 Wed 4 22:58 Tue 3 22:58
Details

109 109 

110- The REST API (currently `v1`)110- The REST API (currently `v1`)

111- First-party [client libraries](https://developers.openai.com/api/docs/libraries) (released libraries adhere to [semantic versioning](https://semver.org/))111- First-party [client libraries](https://developers.openai.com/api/docs/libraries) (released libraries adhere to [semantic versioning](https://semver.org/))

112- [Model](https://developers.openai.com/api/docs/models) families (like `gpt-4o` or `o4-mini`)112- [Model families](https://developers.openai.com/api/docs/models)

113 113 

114**Model prompting behavior between snapshots is subject to change**.114**Model prompting behavior between snapshots is subject to change**.

115Model outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run [evals](https://developers.openai.com/api/docs/guides/evals) for your applications.115Model outputs are by their nature variable, so expect changes in prompting and model behavior between snapshots. The best way to ensure consistent prompting behavior and model output is to use pinned model versions, and to run [evals](https://developers.openai.com/api/docs/guides/evals) for your applications.

116 116 

117For model shutdown dates and recommended replacements, see [deprecations](https://developers.openai.com/api/docs/deprecations).

118 

117**Backwards-compatible API changes**:119**Backwards-compatible API changes**:

118 120 

119- Adding new resources (URLs) to the REST API and client libraries121- Adding new resources (URLs) to the REST API and client libraries

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/organization/admin_api_keys \

31 -H 'Content-Type: application/json' \

32 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

33 -d '{

34 "name": "New Admin Key",

35 "expires_in_seconds": 2592000

36 }'

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "id": "key_abc",

44 "created_at": 1711471533,

45 "expires_at": 1714063533,

46 "object": "organization.admin_api_key",

47 "owner": {

48 "id": "sa_456",

49 "created_at": 1711471533,

50 "name": "My Service Account",

51 "object": "organization.user",

52 "role": "owner",

53 "type": "user"

54 },

55 "redacted_value": "sk-admin...def",

56 "last_used_at": 1711471534,

57 "name": "Administration Key",

58 "value": "sk-admin-1234abcd"

59}

60```

61 

62### Example

63 

64```http29```http

65curl -X POST https://api.openai.com/v1/organization/admin_api_keys \30curl -X POST https://api.openai.com/v1/organization/admin_api_keys \

66 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \31 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

24 24 

25### Example25### Example

26 26 

27```http

28curl https://api.openai.com/v1/organization/admin_api_keys/$KEY_ID \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "id": "key_abc",

38 "deleted": true,

39 "object": "organization.admin_api_key.deleted"

40}

41```

42 

43### Example

44 

45```http27```http

46curl -X DELETE https://api.openai.com/v1/organization/admin_api_keys/key_abc \28curl -X DELETE https://api.openai.com/v1/organization/admin_api_keys/key_abc \

47 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \29 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

104 104 

105### Example105### Example

106 106 

107```http

108curl https://api.openai.com/v1/organization/admin_api_keys \

109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

110```

111 

112#### 200 — Example

113 

114```json

115{

116 "data": [

117 {

118 "id": "key_abc",

119 "created_at": 1711471533,

120 "expires_at": 1714063533,

121 "object": "organization.admin_api_key",

122 "owner": {

123 "id": "sa_456",

124 "created_at": 1711471533,

125 "name": "My Service Account",

126 "object": "organization.user",

127 "role": "owner",

128 "type": "user"

129 },

130 "redacted_value": "sk-admin...def",

131 "last_used_at": 1711471534,

132 "name": "Administration Key"

133 }

134 ],

135 "has_more": false,

136 "object": "list",

137 "first_id": "key_abc",

138 "last_id": "key_xyz"

139}

140```

141 

142### Example

143 

144```http107```http

145curl https://api.openai.com/v1/organization/admin_api_keys?after=key_abc&limit=20 \108curl https://api.openai.com/v1/organization/admin_api_keys?after=key_abc&limit=20 \

146 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

84 84 

85### Example85### Example

86 86 

87```http

88curl https://api.openai.com/v1/organization/admin_api_keys/$KEY_ID \

89 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

90```

91 

92#### 200 — Example

93 

94```json

95{

96 "id": "key_abc",

97 "created_at": 1711471533,

98 "expires_at": 1714063533,

99 "object": "organization.admin_api_key",

100 "owner": {

101 "id": "sa_456",

102 "created_at": 1711471533,

103 "name": "My Service Account",

104 "object": "organization.user",

105 "role": "owner",

106 "type": "user"

107 },

108 "redacted_value": "sk-admin...def",

109 "last_used_at": 1711471534,

110 "name": "Administration Key"

111}

112```

113 

114### Example

115 

116```http87```http

117curl https://api.openai.com/v1/organization/admin_api_keys/key_abc \88curl https://api.openai.com/v1/organization/admin_api_keys/key_abc \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \89 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

1754 1754 

1755### Example1755### Example

1756 1756 

1757```http

1758curl https://api.openai.com/v1/organization/audit_logs \

1759 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

1760```

1761 

1762#### 200 — Example

1763 

1764```json

1765{

1766 "data": [

1767 {

1768 "id": "id",

1769 "effective_at": 0,

1770 "type": "api_key.created",

1771 "actor": {

1772 "api_key": {

1773 "id": "id",

1774 "service_account": {

1775 "id": "id"

1776 },

1777 "type": "user",

1778 "user": {

1779 "id": "id",

1780 "email": "email"

1781 }

1782 },

1783 "session": {

1784 "ip_address": "ip_address",

1785 "user": {

1786 "id": "id",

1787 "email": "email"

1788 }

1789 },

1790 "type": "session"

1791 },

1792 "api_key.created": {

1793 "id": "id",

1794 "data": {

1795 "scopes": [

1796 "string"

1797 ]

1798 }

1799 },

1800 "api_key.deleted": {

1801 "id": "id"

1802 },

1803 "api_key.updated": {

1804 "id": "id",

1805 "changes_requested": {

1806 "expires_in_seconds": 0,

1807 "scopes": [

1808 "string"

1809 ]

1810 }

1811 },

1812 "certificate.created": {

1813 "id": "id",

1814 "name": "name"

1815 },

1816 "certificate.deleted": {

1817 "id": "id",

1818 "certificate": "certificate",

1819 "name": "name"

1820 },

1821 "certificate.updated": {

1822 "id": "id",

1823 "name": "name"

1824 },

1825 "certificates.activated": {

1826 "certificates": [

1827 {

1828 "id": "id",

1829 "name": "name"

1830 }

1831 ]

1832 },

1833 "certificates.deactivated": {

1834 "certificates": [

1835 {

1836 "id": "id",

1837 "name": "name"

1838 }

1839 ]

1840 },

1841 "checkpoint.permission.created": {

1842 "id": "id",

1843 "data": {

1844 "fine_tuned_model_checkpoint": "fine_tuned_model_checkpoint",

1845 "project_id": "project_id"

1846 }

1847 },

1848 "checkpoint.permission.deleted": {

1849 "id": "id"

1850 },

1851 "external_key.registered": {

1852 "id": "id",

1853 "data": {}

1854 },

1855 "external_key.removed": {

1856 "id": "id"

1857 },

1858 "external_storage.registered": {

1859 "id": "id",

1860 "data": {

1861 "geography": "geography",

1862 "provider": {

1863 "account_id": "account_id",

1864 "bucket": "bucket",

1865 "external_id": "external_id",

1866 "region": "region",

1867 "role_arn": "role_arn",

1868 "type": "aws"

1869 }

1870 }

1871 },

1872 "external_storage.removed": {

1873 "id": "id"

1874 },

1875 "group.created": {

1876 "id": "id",

1877 "data": {

1878 "group_name": "group_name"

1879 }

1880 },

1881 "group.deleted": {

1882 "id": "id"

1883 },

1884 "group.updated": {

1885 "id": "id",

1886 "changes_requested": {

1887 "group_name": "group_name"

1888 }

1889 },

1890 "invite.accepted": {

1891 "id": "id"

1892 },

1893 "invite.deleted": {

1894 "id": "id"

1895 },

1896 "invite.sent": {

1897 "id": "id",

1898 "data": {

1899 "email": "email",

1900 "role": "role"

1901 }

1902 },

1903 "ip_allowlist.config.activated": {

1904 "configs": [

1905 {

1906 "id": "id",

1907 "name": "name"

1908 }

1909 ]

1910 },

1911 "ip_allowlist.config.deactivated": {

1912 "configs": [

1913 {

1914 "id": "id",

1915 "name": "name"

1916 }

1917 ]

1918 },

1919 "ip_allowlist.created": {

1920 "id": "id",

1921 "allowed_ips": [

1922 "string"

1923 ],

1924 "name": "name"

1925 },

1926 "ip_allowlist.deleted": {

1927 "id": "id",

1928 "allowed_ips": [

1929 "string"

1930 ],

1931 "name": "name"

1932 },

1933 "ip_allowlist.updated": {

1934 "id": "id",

1935 "allowed_ips": [

1936 "string"

1937 ]

1938 },

1939 "login.failed": {

1940 "error_code": "error_code",

1941 "error_message": "error_message"

1942 },

1943 "login.succeeded": {},

1944 "logout.failed": {

1945 "error_code": "error_code",

1946 "error_message": "error_message"

1947 },

1948 "logout.succeeded": {},

1949 "organization.updated": {

1950 "id": "id",

1951 "changes_requested": {

1952 "api_call_logging": "api_call_logging",

1953 "api_call_logging_project_ids": "api_call_logging_project_ids",

1954 "description": "description",

1955 "name": "name",

1956 "threads_ui_visibility": "threads_ui_visibility",

1957 "title": "title",

1958 "usage_dashboard_visibility": "usage_dashboard_visibility"

1959 }

1960 },

1961 "project": {

1962 "id": "id",

1963 "name": "name"

1964 },

1965 "project.archived": {

1966 "id": "id"

1967 },

1968 "project.created": {

1969 "id": "id",

1970 "data": {

1971 "name": "name",

1972 "title": "title"

1973 }

1974 },

1975 "project.deleted": {

1976 "id": "id"

1977 },

1978 "project.updated": {

1979 "id": "id",

1980 "changes_requested": {

1981 "title": "title"

1982 }

1983 },

1984 "rate_limit.deleted": {

1985 "id": "id"

1986 },

1987 "rate_limit.updated": {

1988 "id": "id",

1989 "changes_requested": {

1990 "batch_1_day_max_input_tokens": 0,

1991 "max_audio_megabytes_per_1_minute": 0,

1992 "max_images_per_1_minute": 0,

1993 "max_requests_per_1_day": 0,

1994 "max_requests_per_1_minute": 0,

1995 "max_tokens_per_1_minute": 0

1996 }

1997 },

1998 "role.assignment.created": {

1999 "id": "id",

2000 "principal_id": "principal_id",

2001 "principal_type": "principal_type",

2002 "resource_id": "resource_id",

2003 "resource_type": "resource_type"

2004 },

2005 "role.assignment.deleted": {

2006 "id": "id",

2007 "principal_id": "principal_id",

2008 "principal_type": "principal_type",

2009 "resource_id": "resource_id",

2010 "resource_type": "resource_type"

2011 },

2012 "role.bound_to_resource": {

2013 "id": "id",

2014 "connector_id": "connector_id",

2015 "connector_name": "connector_name",

2016 "enabled": true,

2017 "permissions": [

2018 "string"

2019 ],

2020 "resource_id": "resource_id",

2021 "resource_type": "resource_type",

2022 "role_id": "role_id",

2023 "source": "role_toggle",

2024 "workspace_id": "workspace_id"

2025 },

2026 "role.created": {

2027 "id": "id",

2028 "permissions": [

2029 "string"

2030 ],

2031 "resource_id": "resource_id",

2032 "resource_type": "resource_type",

2033 "role_name": "role_name"

2034 },

2035 "role.deleted": {

2036 "id": "id"

2037 },

2038 "role.unbound_from_resource": {

2039 "id": "id",

2040 "connector_id": "connector_id",

2041 "connector_name": "connector_name",

2042 "enabled": true,

2043 "permissions": [

2044 "string"

2045 ],

2046 "resource_id": "resource_id",

2047 "resource_type": "resource_type",

2048 "role_id": "role_id",

2049 "source": "role_toggle",

2050 "workspace_id": "workspace_id"

2051 },

2052 "role.updated": {

2053 "id": "id",

2054 "changes_requested": {

2055 "description": "description",

2056 "metadata": {},

2057 "permissions_added": [

2058 "string"

2059 ],

2060 "permissions_removed": [

2061 "string"

2062 ],

2063 "resource_id": "resource_id",

2064 "resource_type": "resource_type",

2065 "role_name": "role_name"

2066 }

2067 },

2068 "scim.disabled": {

2069 "id": "id"

2070 },

2071 "scim.enabled": {

2072 "id": "id"

2073 },

2074 "service_account.created": {

2075 "id": "id",

2076 "data": {

2077 "role": "role"

2078 }

2079 },

2080 "service_account.deleted": {

2081 "id": "id"

2082 },

2083 "service_account.updated": {

2084 "id": "id",

2085 "changes_requested": {

2086 "role": "role"

2087 }

2088 },

2089 "user.added": {

2090 "id": "id",

2091 "data": {

2092 "role": "role"

2093 }

2094 },

2095 "user.deleted": {

2096 "id": "id"

2097 },

2098 "user.updated": {

2099 "id": "id",

2100 "changes_requested": {

2101 "role": "role"

2102 }

2103 },

2104 "workload_identity_provider_mapping.created": {

2105 "id": "id",

2106 "data": {},

2107 "identity_provider_id": "identity_provider_id"

2108 },

2109 "workload_identity_provider_mapping.deleted": {

2110 "id": "id",

2111 "identity_provider_id": "identity_provider_id",

2112 "project_id": "project_id",

2113 "service_account_id": "service_account_id"

2114 },

2115 "workload_identity_provider_mapping.updated": {

2116 "id": "id",

2117 "changes_requested": {},

2118 "identity_provider_id": "identity_provider_id"

2119 },

2120 "workload_identity_provider.created": {

2121 "id": "id",

2122 "data": {}

2123 },

2124 "workload_identity_provider.deleted": {

2125 "id": "id",

2126 "name": "name"

2127 },

2128 "workload_identity_provider.updated": {

2129 "id": "id",

2130 "changes_requested": {}

2131 }

2132 }

2133 ],

2134 "has_more": true,

2135 "object": "list",

2136 "first_id": "audit_log-defb456h8dks",

2137 "last_id": "audit_log-hnbkd8s93s"

2138}

2139```

2140 

2141### Example

2142 

2143```http1757```http

2144curl https://api.openai.com/v1/organization/audit_logs \1758curl https://api.openai.com/v1/organization/audit_logs \

2145-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \1759-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

66 66 

67### Example67### Example

68 68 

69```http

70curl https://api.openai.com/v1/organization/certificates/activate \

71 -H 'Content-Type: application/json' \

72 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

73 -d '{

74 "certificate_ids": [

75 "cert_abc"

76 ]

77 }'

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "data": [

85 {

86 "id": "id",

87 "active": true,

88 "certificate_details": {

89 "expires_at": 0,

90 "valid_at": 0

91 },

92 "created_at": 0,

93 "name": "name",

94 "object": "organization.certificate"

95 }

96 ],

97 "object": "organization.certificate.activation"

98}

99```

100 

101### Example

102 

103```http69```http

104curl https://api.openai.com/v1/organization/certificates/activate \70curl https://api.openai.com/v1/organization/certificates/activate \

105-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \71-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/organization/certificates \

83 -H 'Content-Type: application/json' \

84 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

85 -d '{

86 "certificate": "certificate"

87 }'

88```

89 

90#### 200 — Example

91 

92```json

93{

94 "id": "id",

95 "certificate_details": {

96 "content": "content",

97 "expires_at": 0,

98 "valid_at": 0

99 },

100 "created_at": 0,

101 "name": "name",

102 "object": "certificate",

103 "active": true

104}

105```

106 

107### Example

108 

109```http81```http

110curl -X POST https://api.openai.com/v1/organization/certificates \82curl -X POST https://api.openai.com/v1/organization/certificates \

111-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \83-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

66 66 

67### Example67### Example

68 68 

69```http

70curl https://api.openai.com/v1/organization/certificates/deactivate \

71 -H 'Content-Type: application/json' \

72 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

73 -d '{

74 "certificate_ids": [

75 "cert_abc"

76 ]

77 }'

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "data": [

85 {

86 "id": "id",

87 "active": true,

88 "certificate_details": {

89 "expires_at": 0,

90 "valid_at": 0

91 },

92 "created_at": 0,

93 "name": "name",

94 "object": "organization.certificate"

95 }

96 ],

97 "object": "organization.certificate.deactivation"

98}

99```

100 

101### Example

102 

103```http69```http

104curl https://api.openai.com/v1/organization/certificates/deactivate \70curl https://api.openai.com/v1/organization/certificates/deactivate \

105-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \71-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

28 28 

29### Example29### Example

30 30 

31```http

32curl https://api.openai.com/v1/organization/certificates/$CERTIFICATE_ID \

33 -X DELETE \

34 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

35```

36 

37#### 200 — Example

38 

39```json

40{

41 "id": "id",

42 "object": "certificate.deleted"

43}

44```

45 

46### Example

47 

48```http31```http

49curl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \32curl -X DELETE https://api.openai.com/v1/organization/certificates/cert_abc \

50-H "Authorization: Bearer $OPENAI_ADMIN_KEY"33-H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/organization/certificates \

83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

84```

85 

86#### 200 — Example

87 

88```json

89{

90 "data": [

91 {

92 "id": "id",

93 "active": true,

94 "certificate_details": {

95 "expires_at": 0,

96 "valid_at": 0

97 },

98 "created_at": 0,

99 "name": "name",

100 "object": "organization.certificate"

101 }

102 ],

103 "first_id": "cert_abc",

104 "has_more": true,

105 "last_id": "cert_abc",

106 "object": "list"

107}

108```

109 

110### Example

111 

112```http81```http

113curl https://api.openai.com/v1/organization/certificates \82curl https://api.openai.com/v1/organization/certificates \

114-H "Authorization: Bearer $OPENAI_ADMIN_KEY"83-H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

80 80 

81### Example81### Example

82 82 

83```http

84curl https://api.openai.com/v1/organization/certificates/$CERTIFICATE_ID \

85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

86```

87 

88#### 200 — Example

89 

90```json

91{

92 "id": "id",

93 "certificate_details": {

94 "content": "content",

95 "expires_at": 0,

96 "valid_at": 0

97 },

98 "created_at": 0,

99 "name": "name",

100 "object": "certificate",

101 "active": true

102}

103```

104 

105### Example

106 

107```http83```http

108curl "https://api.openai.com/v1/organization/certificates/cert_abc?include[]=content" \84curl "https://api.openai.com/v1/organization/certificates/cert_abc?include[]=content" \

109-H "Authorization: Bearer $OPENAI_ADMIN_KEY"85-H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/organization/certificates/$CERTIFICATE_ID \

83 -H 'Content-Type: application/json' \

84 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

85 -d '{}'

86```

87 

88#### 200 — Example

89 

90```json

91{

92 "id": "id",

93 "certificate_details": {

94 "content": "content",

95 "expires_at": 0,

96 "valid_at": 0

97 },

98 "created_at": 0,

99 "name": "name",

100 "object": "certificate",

101 "active": true

102}

103```

104 

105### Example

106 

107```http81```http

108curl -X POST https://api.openai.com/v1/organization/certificates/cert_abc \82curl -X POST https://api.openai.com/v1/organization/certificates/cert_abc \

109-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \83-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

32 32 

33### Example33### Example

34 34 

35```http

36curl https://api.openai.com/v1/organization/data_retention \

37 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

38```

39 

40#### 200 — Example

41 

42```json

43{

44 "object": "organization.data_retention",

45 "type": "zero_data_retention"

46}

47```

48 

49### Example

50 

51```http35```http

52curl https://api.openai.com/v1/organization/data_retention \36curl https://api.openai.com/v1/organization/data_retention \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \37 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

48 48 

49### Example49### Example

50 50 

51```http

52curl https://api.openai.com/v1/organization/data_retention \

53 -H 'Content-Type: application/json' \

54 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

55 -d '{

56 "retention_type": "zero_data_retention"

57 }'

58```

59 

60#### 200 — Example

61 

62```json

63{

64 "object": "organization.data_retention",

65 "type": "zero_data_retention"

66}

67```

68 

69### Example

70 

71```http51```http

72curl -X POST https://api.openai.com/v1/organization/data_retention \52curl -X POST https://api.openai.com/v1/organization/data_retention \

73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

24 24 

25### Example25### Example

26 26 

27```http

28curl https://api.openai.com/v1/organization/external_storage/$EXTERNAL_STORAGE_ID \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "id": "id",

38 "deleted": true,

39 "object": "organization.external_storage.deleted"

40}

41```

42 

43### Example

44 

45```http27```http

46curl -X DELETE https://api.openai.com/v1/organization/external_storage/extstorage_abc123 \28curl -X DELETE https://api.openai.com/v1/organization/external_storage/extstorage_abc123 \

47 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \29 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

130 130 

131### Example131### Example

132 132 

133```http

134curl https://api.openai.com/v1/organization/external_storage \

135 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

136```

137 

138#### 200 — Example

139 

140```json

141{

142 "data": [

143 {

144 "id": "id",

145 "created_at": 0,

146 "geography": "geography",

147 "object": "organization.external_storage",

148 "project_id": "project_id",

149 "provider": {

150 "account_id": "account_id",

151 "bucket": "bucket",

152 "external_id": "external_id",

153 "region": "region",

154 "role_arn": "role_arn",

155 "type": "aws"

156 },

157 "status": "pending"

158 }

159 ],

160 "first_id": "first_id",

161 "has_more": true,

162 "last_id": "last_id",

163 "object": "list"

164}

165```

166 

167### Example

168 

169```http133```http

170curl "https://api.openai.com/v1/organization/external_storage?limit=20&order=desc" \134curl "https://api.openai.com/v1/organization/external_storage?limit=20&order=desc" \

171 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \135 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

106 106 

107### Example107### Example

108 108 

109```http

110curl https://api.openai.com/v1/organization/external_storage/$EXTERNAL_STORAGE_ID \

111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

112```

113 

114#### 200 — Example

115 

116```json

117{

118 "id": "id",

119 "created_at": 0,

120 "geography": "geography",

121 "object": "organization.external_storage",

122 "project_id": "project_id",

123 "provider": {

124 "account_id": "account_id",

125 "bucket": "bucket",

126 "external_id": "external_id",

127 "region": "region",

128 "role_arn": "role_arn",

129 "type": "aws"

130 },

131 "status": "pending"

132}

133```

134 

135### Example

136 

137```http109```http

138curl https://api.openai.com/v1/organization/external_storage/extstorage_azure123 \110curl https://api.openai.com/v1/organization/external_storage/extstorage_azure123 \

139 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

106 106 

107### Example107### Example

108 108 

109```http

110curl https://api.openai.com/v1/organization/external_storage/$EXTERNAL_STORAGE_ID/validate \

111 -X POST \

112 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

113```

114 

115#### 200 — Example

116 

117```json

118{

119 "id": "id",

120 "created_at": 0,

121 "geography": "geography",

122 "object": "organization.external_storage",

123 "project_id": "project_id",

124 "provider": {

125 "account_id": "account_id",

126 "bucket": "bucket",

127 "external_id": "external_id",

128 "region": "region",

129 "role_arn": "role_arn",

130 "type": "aws"

131 },

132 "status": "pending"

133}

134```

135 

136### Example

137 

138```http109```http

139curl -X POST https://api.openai.com/v1/organization/external_storage/extstorage_azure123/validate \110curl -X POST https://api.openai.com/v1/organization/external_storage/extstorage_azure123/validate \

140 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

50 50 

51### Example51### Example

52 52 

53```http

54curl https://api.openai.com/v1/organization/groups \

55 -H 'Content-Type: application/json' \

56 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

57 -d '{

58 "name": "x"

59 }'

60```

61 

62#### 200 — Example

63 

64```json

65{

66 "id": "id",

67 "created_at": 0,

68 "group_type": "group",

69 "is_scim_managed": true,

70 "name": "name"

71}

72```

73 

74### Example

75 

76```http53```http

77curl -X POST https://api.openai.com/v1/organization/groups \54curl -X POST https://api.openai.com/v1/organization/groups \

78 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \55 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/organization/groups/$GROUP_ID \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "id": "id",

44 "deleted": true,

45 "object": "group.deleted"

46}

47```

48 

49### Example

50 

51```http33```http

52curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \34curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \35 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

74 74 

75### Example75### Example

76 76 

77```http

78curl https://api.openai.com/v1/organization/groups \

79 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

80```

81 

82#### 200 — Example

83 

84```json

85{

86 "data": [

87 {

88 "id": "id",

89 "created_at": 0,

90 "group_type": "group",

91 "is_scim_managed": true,

92 "name": "name"

93 }

94 ],

95 "has_more": true,

96 "next": "next",

97 "object": "list"

98}

99```

100 

101### Example

102 

103```http77```http

104curl https://api.openai.com/v1/organization/groups?limit=20&order=asc \78curl https://api.openai.com/v1/organization/groups?limit=20&order=asc \

105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \79 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

46 46 

47### Example47### Example

48 48 

49```http

50curl https://api.openai.com/v1/organization/groups/$GROUP_ID \

51 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

52```

53 

54#### 200 — Example

55 

56```json

57{

58 "id": "id",

59 "created_at": 0,

60 "group_type": "group",

61 "is_scim_managed": true,

62 "name": "name"

63}

64```

65 

66### Example

67 

68```http49```http

69curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \50curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \

70 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \51 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

44 44 

45### Example45### Example

46 46 

47```http

48curl https://api.openai.com/v1/organization/groups/$GROUP_ID \

49 -H 'Content-Type: application/json' \

50 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

51 -d '{

52 "name": "x"

53 }'

54```

55 

56#### 200 — Example

57 

58```json

59{

60 "id": "id",

61 "created_at": 0,

62 "is_scim_managed": true,

63 "name": "name"

64}

65```

66 

67### Example

68 

69```http47```http

70curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \48curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ \

71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \49 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

92 92 

93### Example93### Example

94 94 

95```http

96curl https://api.openai.com/v1/organization/groups/$GROUP_ID/roles \

97 -H 'Content-Type: application/json' \

98 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

99 -d '{

100 "role_id": "role_id"

101 }'

102```

103 

104#### 200 — Example

105 

106```json

107{

108 "group": {

109 "id": "id",

110 "created_at": 0,

111 "name": "name",

112 "object": "group",

113 "scim_managed": true

114 },

115 "object": "group.role",

116 "role": {

117 "id": "id",

118 "description": "description",

119 "name": "name",

120 "object": "role",

121 "permissions": [

122 "string"

123 ],

124 "predefined_role": true,

125 "resource_type": "resource_type"

126 }

127}

128```

129 

130### Example

131 

132```http95```http

133curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \96curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \

134 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \97 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

28 28 

29### Example29### Example

30 30 

31```http

32curl https://api.openai.com/v1/organization/groups/$GROUP_ID/roles/$ROLE_ID \

33 -X DELETE \

34 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

35```

36 

37#### 200 — Example

38 

39```json

40{

41 "deleted": true,

42 "object": "object"

43}

44```

45 

46### Example

47 

48```http31```http

49curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8ROLE01 \32curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8ROLE01 \

50 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \33 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

110 110 

111### Example111### Example

112 112 

113```http

114curl https://api.openai.com/v1/organization/groups/$GROUP_ID/roles \

115 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

116```

117 

118#### 200 — Example

119 

120```json

121{

122 "data": [

123 {

124 "id": "id",

125 "assignment_sources": [

126 {

127 "principal_id": "principal_id",

128 "principal_type": "principal_type"

129 }

130 ],

131 "created_at": 0,

132 "created_by": "created_by",

133 "created_by_user_obj": {

134 "foo": "bar"

135 },

136 "description": "description",

137 "metadata": {

138 "foo": "bar"

139 },

140 "name": "name",

141 "permissions": [

142 "string"

143 ],

144 "predefined_role": true,

145 "resource_type": "resource_type",

146 "updated_at": 0

147 }

148 ],

149 "has_more": true,

150 "next": "next",

151 "object": "list"

152}

153```

154 

155### Example

156 

157```http113```http

158curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \114curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles \

159 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \115 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

76 76 

77### Example77### Example

78 78 

79```http

80curl https://api.openai.com/v1/organization/groups/$GROUP_ID/roles/$ROLE_ID \

81 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

82```

83 

84#### 200 — Example

85 

86```json

87{

88 "id": "id",

89 "assignment_sources": [

90 {

91 "principal_id": "principal_id",

92 "principal_type": "principal_type"

93 }

94 ],

95 "created_at": 0,

96 "created_by": "created_by",

97 "created_by_user_obj": {

98 "foo": "bar"

99 },

100 "description": "description",

101 "metadata": {

102 "foo": "bar"

103 },

104 "name": "name",

105 "permissions": [

106 "string"

107 ],

108 "predefined_role": true,

109 "resource_type": "resource_type",

110 "updated_at": 0

111}

112```

113 

114### Example

115 

116```http79```http

117curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8ROLE01 \80curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8ROLE01 \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \81 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

38 38 

39### Example39### Example

40 40 

41```http

42curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users \

43 -H 'Content-Type: application/json' \

44 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

45 -d '{

46 "user_id": "user_id"

47 }'

48```

49 

50#### 200 — Example

51 

52```json

53{

54 "group_id": "group_id",

55 "object": "group.user",

56 "user_id": "user_id"

57}

58```

59 

60### Example

61 

62```http41```http

63curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users \42curl -X POST https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users \

64 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \43 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users/$USER_ID \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "deleted": true,

44 "object": "group.user.deleted"

45}

46```

47 

48### Example

49 

50```http33```http

51curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users/user_abc123 \34curl -X DELETE https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users/user_abc123 \

52 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \35 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

66 66 

67### Example67### Example

68 68 

69```http

70curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users \

71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

72```

73 

74#### 200 — Example

75 

76```json

77{

78 "data": [

79 {

80 "id": "id",

81 "email": "email",

82 "name": "name"

83 }

84 ],

85 "has_more": true,

86 "next": "next",

87 "object": "list"

88}

89```

90 

91### Example

92 

93```http69```http

94curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users?limit=20 \70curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users?limit=20 \

95 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

48 48 

49### Example49### Example

50 50 

51```http

52curl https://api.openai.com/v1/organization/groups/$GROUP_ID/users/$USER_ID \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

54```

55 

56#### 200 — Example

57 

58```json

59{

60 "id": "id",

61 "email": "email",

62 "is_service_account": true,

63 "name": "name",

64 "picture": "picture",

65 "user_type": "user"

66}

67```

68 

69### Example

70 

71```http51```http

72curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users/user_abc123 \52curl https://api.openai.com/v1/organization/groups/group_01J1F8ABCDXYZ/users/user_abc123 \

73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

112 112 

113### Example113### Example

114 114 

115```http

116curl https://api.openai.com/v1/organization/invites \

117 -H 'Content-Type: application/json' \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

119 -d '{

120 "email": "email",

121 "role": "reader"

122 }'

123```

124 

125#### 200 — Example

126 

127```json

128{

129 "id": "id",

130 "created_at": 0,

131 "email": "email",

132 "object": "organization.invite",

133 "projects": [

134 {

135 "id": "id",

136 "role": "member"

137 }

138 ],

139 "role": "owner",

140 "status": "accepted",

141 "accepted_at": 0,

142 "expires_at": 0

143}

144```

145 

146### Example

147 

148```http115```http

149curl -X POST https://api.openai.com/v1/organization/invites \116curl -X POST https://api.openai.com/v1/organization/invites \

150 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \117 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/organization/invites/$INVITE_ID \

31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

33```

34 

35#### 200 — Example

36 

37```json

38{

39 "id": "id",

40 "deleted": true,

41 "object": "organization.invite.deleted"

42}

43```

44 

45### Example

46 

47```http29```http

48curl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \30curl -X DELETE https://api.openai.com/v1/organization/invites/invite-abc \

49 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \31 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

106 106 

107### Example107### Example

108 108 

109```http

110curl https://api.openai.com/v1/organization/invites \

111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

112```

113 

114#### 200 — Example

115 

116```json

117{

118 "data": [

119 {

120 "id": "id",

121 "created_at": 0,

122 "email": "email",

123 "object": "organization.invite",

124 "projects": [

125 {

126 "id": "id",

127 "role": "member"

128 }

129 ],

130 "role": "owner",

131 "status": "accepted",

132 "accepted_at": 0,

133 "expires_at": 0

134 }

135 ],

136 "has_more": true,

137 "object": "list",

138 "first_id": "first_id",

139 "last_id": "last_id"

140}

141```

142 

143### Example

144 

145```http109```http

146curl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \110curl https://api.openai.com/v1/organization/invites?after=invite-abc&limit=20 \

147 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

86 86 

87### Example87### Example

88 88 

89```http

90curl https://api.openai.com/v1/organization/invites/$INVITE_ID \

91 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

92```

93 

94#### 200 — Example

95 

96```json

97{

98 "id": "id",

99 "created_at": 0,

100 "email": "email",

101 "object": "organization.invite",

102 "projects": [

103 {

104 "id": "id",

105 "role": "member"

106 }

107 ],

108 "role": "owner",

109 "status": "accepted",

110 "accepted_at": 0,

111 "expires_at": 0

112}

113```

114 

115### Example

116 

117```http89```http

118curl https://api.openai.com/v1/organization/invites/invite-abc \90curl https://api.openai.com/v1/organization/invites/invite-abc \

119 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \91 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

88 88 

89### Example89### Example

90 90 

91```http

92curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/archive \

93 -X POST \

94 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

95```

96 

97#### 200 — Example

98 

99```json

100{

101 "id": "id",

102 "created_at": 0,

103 "object": "organization.project",

104 "archived_at": 0,

105 "external_key_id": "external_key_id",

106 "name": "name",

107 "residency": "GLOBAL",

108 "status": "status"

109}

110```

111 

112### Example

113 

114```http91```http

115curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \92curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/archive \

116 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \93 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

133 133 

134### Example134### Example

135 135 

136```http

137curl https://api.openai.com/v1/organization/projects \

138 -H 'Content-Type: application/json' \

139 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

140 -d '{

141 "name": "name"

142 }'

143```

144 

145#### 200 — Example

146 

147```json

148{

149 "id": "id",

150 "created_at": 0,

151 "object": "organization.project",

152 "archived_at": 0,

153 "external_key_id": "external_key_id",

154 "name": "name",

155 "residency": "GLOBAL",

156 "status": "status"

157}

158```

159 

160### Example

161 

162```http136```http

163curl -X POST https://api.openai.com/v1/organization/projects \137curl -X POST https://api.openai.com/v1/organization/projects \

164 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \138 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

104 104 

105### Example105### Example

106 106 

107```http

108curl https://api.openai.com/v1/organization/projects \

109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

110```

111 

112#### 200 — Example

113 

114```json

115{

116 "data": [

117 {

118 "id": "id",

119 "created_at": 0,

120 "object": "organization.project",

121 "archived_at": 0,

122 "external_key_id": "external_key_id",

123 "name": "name",

124 "residency": "GLOBAL",

125 "status": "status"

126 }

127 ],

128 "has_more": true,

129 "object": "list",

130 "first_id": "first_id",

131 "last_id": "last_id"

132}

133```

134 

135### Example

136 

137```http107```http

138curl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \108curl https://api.openai.com/v1/organization/projects?after=proj_abc&limit=20&include_archived=false \

139 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

88 88 

89### Example89### Example

90 90 

91```http

92curl https://api.openai.com/v1/organization/projects/$PROJECT_ID \

93 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

94```

95 

96#### 200 — Example

97 

98```json

99{

100 "id": "id",

101 "created_at": 0,

102 "object": "organization.project",

103 "archived_at": 0,

104 "external_key_id": "external_key_id",

105 "name": "name",

106 "residency": "GLOBAL",

107 "status": "status"

108}

109```

110 

111### Example

112 

113```http91```http

114curl https://api.openai.com/v1/organization/projects/proj_abc \92curl https://api.openai.com/v1/organization/projects/proj_abc \

115 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \93 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

106### Example106### Example

107 107 

108```http108```http

109curl https://api.openai.com/v1/organization/projects/$PROJECT_ID \109curl -X POST https://api.openai.com/v1/organization/projects/proj_abc \

110 -H 'Content-Type: application/json' \

111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \110 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

112 -d '{}'111 -H "Content-Type: application/json" \

112 -d '{

113 "name": "Project DEF"

114 }'

113```115```

114 116 

115#### 200 — Example117#### 200 — Example


126 "status": "status"128 "status": "status"

127}129}

128```130```

129 

130### Example

131 

132```http

133curl -X POST https://api.openai.com/v1/organization/projects/proj_abc \

134 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

135 -H "Content-Type: application/json" \

136 -d '{

137 "name": "Project DEF"

138 }'

139```

Details

33 33 

34### Example34### Example

35 35 

36```http

37curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys/$API_KEY_ID \

38 -X DELETE \

39 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

40```

41 

42#### 200 — Example

43 

44```json

45{

46 "id": "id",

47 "deleted": true,

48 "object": "organization.project.api_key.deleted"

49}

50```

51 

52### Example

53 

54```http36```http

55curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \37curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \

56 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \38 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

150 150 

151### Example151### Example

152 152 

153```http

154curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys \

155 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

156```

157 

158#### 200 — Example

159 

160```json

161{

162 "data": [

163 {

164 "id": "id",

165 "created_at": 0,

166 "last_used_at": 0,

167 "name": "name",

168 "object": "organization.project.api_key",

169 "owner": {

170 "service_account": {

171 "id": "id",

172 "created_at": 0,

173 "name": "name",

174 "role": "role"

175 },

176 "type": "user",

177 "user": {

178 "id": "id",

179 "created_at": 0,

180 "email": "email",

181 "name": "name",

182 "role": "role"

183 }

184 },

185 "owner_project_access": "active",

186 "redacted_value": "redacted_value",

187 "expires_at": 0

188 }

189 ],

190 "has_more": true,

191 "object": "list",

192 "first_id": "first_id",

193 "last_id": "last_id"

194}

195```

196 

197### Example

198 

199```http153```http

200curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys?after=key_abc&limit=20&owner_project_access=any \154curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys?after=key_abc&limit=20&owner_project_access=any \

201 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \155 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

126 126 

127### Example127### Example

128 128 

129```http

130curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys/$API_KEY_ID \

131 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

132```

133 

134#### 200 — Example

135 

136```json

137{

138 "id": "id",

139 "created_at": 0,

140 "last_used_at": 0,

141 "name": "name",

142 "object": "organization.project.api_key",

143 "owner": {

144 "service_account": {

145 "id": "id",

146 "created_at": 0,

147 "name": "name",

148 "role": "role"

149 },

150 "type": "user",

151 "user": {

152 "id": "id",

153 "created_at": 0,

154 "email": "email",

155 "name": "name",

156 "role": "role"

157 }

158 },

159 "owner_project_access": "active",

160 "redacted_value": "redacted_value",

161 "expires_at": 0

162}

163```

164 

165### Example

166 

167```http129```http

168curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \130curl https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \

169 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \131 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

156 156 

157### Example157### Example

158 158 

159```http

160curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/api_keys/$API_KEY_ID \

161 -H 'Content-Type: application/json' \

162 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

163 -d '{

164 "scopes": [

165 "api.all.read"

166 ]

167 }'

168```

169 

170#### 200 — Example

171 

172```json

173{

174 "id": "id",

175 "created_at": 0,

176 "last_used_at": 0,

177 "name": "name",

178 "object": "organization.project.api_key",

179 "owner": {

180 "service_account": {

181 "id": "id",

182 "created_at": 0,

183 "name": "name",

184 "role": "role"

185 },

186 "type": "user",

187 "user": {

188 "id": "id",

189 "created_at": 0,

190 "email": "email",

191 "name": "name",

192 "role": "role"

193 }

194 },

195 "owner_project_access": "active",

196 "redacted_value": "redacted_value",

197 "expires_at": 0

198}

199```

200 

201### Example

202 

203```http159```http

204curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \160curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/api_keys/key_abc \

205 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \161 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

72 72 

73### Example73### Example

74 74 

75```http

76curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/certificates/activate \

77 -H 'Content-Type: application/json' \

78 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

79 -d '{

80 "certificate_ids": [

81 "cert_abc"

82 ]

83 }'

84```

85 

86#### 200 — Example

87 

88```json

89{

90 "data": [

91 {

92 "id": "id",

93 "active": true,

94 "certificate_details": {

95 "expires_at": 0,

96 "valid_at": 0

97 },

98 "created_at": 0,

99 "name": "name",

100 "object": "organization.project.certificate"

101 }

102 ],

103 "object": "organization.project.certificate.activation"

104}

105```

106 

107### Example

108 

109```http75```http

110curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \76curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/activate \

111-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \77-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

71 71 

72### Example72### Example

73 73 

74```http

75curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/certificates/deactivate \

76 -H 'Content-Type: application/json' \

77 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

78 -d '{

79 "certificate_ids": [

80 "cert_abc"

81 ]

82 }'

83```

84 

85#### 200 — Example

86 

87```json

88{

89 "data": [

90 {

91 "id": "id",

92 "active": true,

93 "certificate_details": {

94 "expires_at": 0,

95 "valid_at": 0

96 },

97 "created_at": 0,

98 "name": "name",

99 "object": "organization.project.certificate"

100 }

101 ],

102 "object": "organization.project.certificate.deactivation"

103}

104```

105 

106### Example

107 

108```http74```http

109curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/deactivate \75curl https://api.openai.com/v1/organization/projects/proj_abc/certificates/deactivate \

110-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \76-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

84 84 

85### Example85### Example

86 86 

87```http

88curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/certificates \

89 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

90```

91 

92#### 200 — Example

93 

94```json

95{

96 "data": [

97 {

98 "id": "id",

99 "active": true,

100 "certificate_details": {

101 "expires_at": 0,

102 "valid_at": 0

103 },

104 "created_at": 0,

105 "name": "name",

106 "object": "organization.project.certificate"

107 }

108 ],

109 "first_id": "cert_abc",

110 "has_more": true,

111 "last_id": "cert_abc",

112 "object": "list"

113}

114```

115 

116### Example

117 

118```http87```http

119curl https://api.openai.com/v1/organization/projects/proj_abc/certificates \88curl https://api.openai.com/v1/organization/projects/proj_abc/certificates \

120-H "Authorization: Bearer $OPENAI_ADMIN_KEY"89-H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

42 42 

43### Example43### Example

44 44 

45```http

46curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/data_retention \

47 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

48```

49 

50#### 200 — Example

51 

52```json

53{

54 "object": "project.data_retention",

55 "type": "organization_default"

56}

57```

58 

59### Example

60 

61```http45```http

62curl https://api.openai.com/v1/organization/projects/proj_abc/data_retention \46curl https://api.openai.com/v1/organization/projects/proj_abc/data_retention \

63 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \47 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

62 62 

63### Example63### Example

64 64 

65```http

66curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/data_retention \

67 -H 'Content-Type: application/json' \

68 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

69 -d '{

70 "retention_type": "organization_default"

71 }'

72```

73 

74#### 200 — Example

75 

76```json

77{

78 "object": "project.data_retention",

79 "type": "organization_default"

80}

81```

82 

83### Example

84 

85```http65```http

86curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/data_retention \66curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/data_retention \

87 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \67 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

64 64 

65### Example65### Example

66 66 

67```http

68curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups \

69 -H 'Content-Type: application/json' \

70 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

71 -d '{

72 "group_id": "group_id",

73 "role": "role"

74 }'

75```

76 

77#### 200 — Example

78 

79```json

80{

81 "created_at": 0,

82 "group_id": "group_id",

83 "group_name": "group_name",

84 "group_type": "group",

85 "object": "project.group",

86 "project_id": "project_id"

87}

88```

89 

90### Example

91 

92```http67```http

93curl -X POST https://api.openai.com/v1/organization/projects/proj_abc123/groups \68curl -X POST https://api.openai.com/v1/organization/projects/proj_abc123/groups \

94 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups/$GROUP_ID \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "deleted": true,

44 "object": "project.group.deleted"

45}

46```

47 

48### Example

49 

50```http33```http

51curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc123/groups/group_01J1F8ABCDXYZ \34curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc123/groups/group_01J1F8ABCDXYZ \

52 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \35 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

86 86 

87### Example87### Example

88 88 

89```http

90curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups \

91 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

92```

93 

94#### 200 — Example

95 

96```json

97{

98 "data": [

99 {

100 "created_at": 0,

101 "group_id": "group_id",

102 "group_name": "group_name",

103 "group_type": "group",

104 "object": "project.group",

105 "project_id": "project_id"

106 }

107 ],

108 "has_more": true,

109 "next": "next",

110 "object": "list"

111}

112```

113 

114### Example

115 

116```http89```http

117curl https://api.openai.com/v1/organization/projects/proj_abc123/groups?limit=20 \90curl https://api.openai.com/v1/organization/projects/proj_abc123/groups?limit=20 \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \91 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

66 66 

67### Example67### Example

68 68 

69```http

70curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/groups/$GROUP_ID \

71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

72```

73 

74#### 200 — Example

75 

76```json

77{

78 "created_at": 0,

79 "group_id": "group_id",

80 "group_name": "group_name",

81 "group_type": "group",

82 "object": "project.group",

83 "project_id": "project_id"

84}

85```

86 

87### Example

88 

89```http69```http

90curl https://api.openai.com/v1/organization/projects/proj_abc123/groups/group_01J1F8ABCDXYZ \70curl https://api.openai.com/v1/organization/projects/proj_abc123/groups/group_01J1F8ABCDXYZ \

91 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

96 96 

97### Example97### Example

98 98 

99```http

100curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles \

101 -H 'Content-Type: application/json' \

102 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

103 -d '{

104 "role_id": "role_id"

105 }'

106```

107 

108#### 200 — Example

109 

110```json

111{

112 "group": {

113 "id": "id",

114 "created_at": 0,

115 "name": "name",

116 "object": "group",

117 "scim_managed": true

118 },

119 "object": "group.role",

120 "role": {

121 "id": "id",

122 "description": "description",

123 "name": "name",

124 "object": "role",

125 "permissions": [

126 "string"

127 ],

128 "predefined_role": true,

129 "resource_type": "resource_type"

130 }

131}

132```

133 

134### Example

135 

136```http99```http

137curl -X POST https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \100curl -X POST https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \

138 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \101 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

32 32 

33### Example33### Example

34 34 

35```http

36curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles/$ROLE_ID \

37 -X DELETE \

38 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

39```

40 

41#### 200 — Example

42 

43```json

44{

45 "deleted": true,

46 "object": "object"

47}

48```

49 

50### Example

51 

52```http35```http

53curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8PROJ \36curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8PROJ \

54 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \37 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

114 114 

115### Example115### Example

116 116 

117```http

118curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles \

119 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

120```

121 

122#### 200 — Example

123 

124```json

125{

126 "data": [

127 {

128 "id": "id",

129 "assignment_sources": [

130 {

131 "principal_id": "principal_id",

132 "principal_type": "principal_type"

133 }

134 ],

135 "created_at": 0,

136 "created_by": "created_by",

137 "created_by_user_obj": {

138 "foo": "bar"

139 },

140 "description": "description",

141 "metadata": {

142 "foo": "bar"

143 },

144 "name": "name",

145 "permissions": [

146 "string"

147 ],

148 "predefined_role": true,

149 "resource_type": "resource_type",

150 "updated_at": 0

151 }

152 ],

153 "has_more": true,

154 "next": "next",

155 "object": "list"

156}

157```

158 

159### Example

160 

161```http117```http

162curl https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \118curl https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles \

163 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \119 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

80 80 

81### Example81### Example

82 82 

83```http

84curl https://api.openai.com/v1/projects/$PROJECT_ID/groups/$GROUP_ID/roles/$ROLE_ID \

85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

86```

87 

88#### 200 — Example

89 

90```json

91{

92 "id": "id",

93 "assignment_sources": [

94 {

95 "principal_id": "principal_id",

96 "principal_type": "principal_type"

97 }

98 ],

99 "created_at": 0,

100 "created_by": "created_by",

101 "created_by_user_obj": {

102 "foo": "bar"

103 },

104 "description": "description",

105 "metadata": {

106 "foo": "bar"

107 },

108 "name": "name",

109 "permissions": [

110 "string"

111 ],

112 "predefined_role": true,

113 "resource_type": "resource_type",

114 "updated_at": 0

115}

116```

117 

118### Example

119 

120```http83```http

121curl https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8PROJ \84curl https://api.openai.com/v1/projects/proj_abc123/groups/group_01J1F8ABCDXYZ/roles/role_01J1F8PROJ \

122 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

60 60 

61### Example61### Example

62 62 

63```http

64curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/hosted_tool_permissions \

65 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

66```

67 

68#### 200 — Example

69 

70```json

71{

72 "code_interpreter": {

73 "enabled": true

74 },

75 "file_search": {

76 "enabled": true

77 },

78 "image_generation": {

79 "enabled": true

80 },

81 "mcp": {

82 "enabled": true

83 },

84 "web_search": {

85 "enabled": true

86 }

87}

88```

89 

90### Example

91 

92```http63```http

93curl https://api.openai.com/v1/organization/projects/proj_abc/hosted_tool_permissions \64curl https://api.openai.com/v1/organization/projects/proj_abc/hosted_tool_permissions \

94 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \65 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

104 104 

105### Example105### Example

106 106 

107```http

108curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/hosted_tool_permissions \

109 -H 'Content-Type: application/json' \

110 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

111 -d '{}'

112```

113 

114#### 200 — Example

115 

116```json

117{

118 "code_interpreter": {

119 "enabled": true

120 },

121 "file_search": {

122 "enabled": true

123 },

124 "image_generation": {

125 "enabled": true

126 },

127 "mcp": {

128 "enabled": true

129 },

130 "web_search": {

131 "enabled": true

132 }

133}

134```

135 

136### Example

137 

138```http107```http

139curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/hosted_tool_permissions \108curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/hosted_tool_permissions \

140 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/model_permissions \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "deleted": true,

44 "object": "project.model_permissions.deleted"

45}

46```

47 

48### Example

49 

50```http33```http

51curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/model_permissions \34curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/model_permissions \

52 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \35 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

38 38 

39### Example39### Example

40 40 

41```http

42curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/model_permissions \

43 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

44```

45 

46#### 200 — Example

47 

48```json

49{

50 "mode": "allow_list",

51 "model_ids": [

52 "string"

53 ],

54 "object": "project.model_permissions"

55}

56```

57 

58### Example

59 

60```http41```http

61curl https://api.openai.com/v1/organization/projects/proj_abc/model_permissions \42curl https://api.openai.com/v1/organization/projects/proj_abc/model_permissions \

62 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \43 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \


70 "object": "project.model_permissions",51 "object": "project.model_permissions",

71 "mode": "allow_list",52 "mode": "allow_list",

72 "model_ids": [53 "model_ids": [

73 "gpt-6-astra",54 "gpt-6.2-astra",

74 "o3"55 "gpt-6.2-sol"

75 ]56 ]

76}57}

77```58```

Details

54 54 

55### Example55### Example

56 56 

57```http

58curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/model_permissions \

59 -H 'Content-Type: application/json' \

60 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

61 -d '{

62 "mode": "allow_list",

63 "model_ids": [

64 "string"

65 ]

66 }'

67```

68 

69#### 200 — Example

70 

71```json

72{

73 "mode": "allow_list",

74 "model_ids": [

75 "string"

76 ],

77 "object": "project.model_permissions"

78}

79```

80 

81### Example

82 

83```http57```http

84curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/model_permissions \58curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/model_permissions \

85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \59 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \


87 -d '{61 -d '{

88 "mode": "deny_list",62 "mode": "deny_list",

89 "model_ids": [63 "model_ids": [

90 "o3"64 "gpt-6.2-sol"

91 ]65 ]

92 }'66 }'

93```67```


99 "object": "project.model_permissions",73 "object": "project.model_permissions",

100 "mode": "deny_list",74 "mode": "deny_list",

101 "model_ids": [75 "model_ids": [

102 "o3"76 "gpt-6.2-sol"

103 ]77 ]

104}78}

105```79```

Details

80 80 

81### Example81### Example

82 82 

83```http

84curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/rate_limits \

85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

86```

87 

88#### 200 example 1

89 

90```json

91{

92 "data": [

93 {

94 "id": "id",

95 "max_requests_per_1_minute": 0,

96 "max_tokens_per_1_minute": 0,

97 "model": "model",

98 "object": "project.rate_limit",

99 "batch_1_day_max_input_tokens": 0,

100 "max_audio_megabytes_per_1_minute": 0,

101 "max_images_per_1_minute": 0,

102 "max_requests_per_1_day": 0

103 }

104 ],

105 "has_more": true,

106 "object": "list",

107 "first_id": "first_id",

108 "last_id": "last_id"

109}

110```

111 

112#### 404 — default

113 

114```json

115{

116 "error": {

117 "code": "project_not_found",

118 "message": "The project proj_abc was not found",

119 "type": "invalid_request_error",

120 "param": null

121 }

122}

123```

124 

125### Example

126 

127```http83```http

128curl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20 \84curl https://api.openai.com/v1/organization/projects/proj_abc/rate_limits?after=rl_xxx&limit=20 \

129 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

90 90 

91### Example91### Example

92 92 

93```http

94curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/rate_limits/$RATE_LIMIT_ID \

95 -H 'Content-Type: application/json' \

96 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

97 -d '{}'

98```

99 

100#### 200 example 1

101 

102```json

103{

104 "id": "id",

105 "max_requests_per_1_minute": 0,

106 "max_tokens_per_1_minute": 0,

107 "model": "model",

108 "object": "project.rate_limit",

109 "batch_1_day_max_input_tokens": 0,

110 "max_audio_megabytes_per_1_minute": 0,

111 "max_images_per_1_minute": 0,

112 "max_requests_per_1_day": 0

113}

114```

115 

116#### 404 — default

117 

118```json

119{

120 "error": {

121 "code": "project_not_found",

122 "message": "The project proj_abc was not found",

123 "type": "invalid_request_error",

124 "param": null

125 }

126}

127```

128 

129### Example

130 

131```http93```http

132curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \94curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/rate_limits/rl_xxx \

133 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \95 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

66 66 

67### Example67### Example

68 68 

69```http

70curl https://api.openai.com/v1/projects/$PROJECT_ID/roles \

71 -H 'Content-Type: application/json' \

72 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

73 -d '{

74 "permissions": [

75 "string"

76 ],

77 "role_name": "role_name"

78 }'

79```

80 

81#### 200 — Example

82 

83```json

84{

85 "id": "id",

86 "description": "description",

87 "name": "name",

88 "object": "role",

89 "permissions": [

90 "string"

91 ],

92 "predefined_role": true,

93 "resource_type": "resource_type"

94}

95```

96 

97### Example

98 

99```http69```http

100curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles \70curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles \

101 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

34 34 

35### Example35### Example

36 36 

37```http

38curl https://api.openai.com/v1/projects/$PROJECT_ID/roles/$ROLE_ID \

39 -X DELETE \

40 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

41```

42 

43#### 200 — Example

44 

45```json

46{

47 "id": "id",

48 "deleted": true,

49 "object": "role.deleted"

50}

51```

52 

53### Example

54 

55```http37```http

56curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \38curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \

57 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \39 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

84 84 

85### Example85### Example

86 86 

87```http

88curl https://api.openai.com/v1/projects/$PROJECT_ID/roles \

89 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

90```

91 

92#### 200 — Example

93 

94```json

95{

96 "data": [

97 {

98 "id": "id",

99 "description": "description",

100 "name": "name",

101 "object": "role",

102 "permissions": [

103 "string"

104 ],

105 "predefined_role": true,

106 "resource_type": "resource_type"

107 }

108 ],

109 "has_more": true,

110 "next": "next",

111 "object": "list"

112}

113```

114 

115### Example

116 

117```http87```http

118curl https://api.openai.com/v1/projects/proj_abc123/roles?limit=20 \88curl https://api.openai.com/v1/projects/proj_abc123/roles?limit=20 \

119 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \89 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

54 54 

55### Example55### Example

56 56 

57```http

58curl https://api.openai.com/v1/projects/$PROJECT_ID/roles/$ROLE_ID \

59 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

60```

61 

62#### 200 — Example

63 

64```json

65{

66 "id": "id",

67 "description": "description",

68 "name": "name",

69 "object": "role",

70 "permissions": [

71 "string"

72 ],

73 "predefined_role": true,

74 "resource_type": "resource_type"

75}

76```

77 

78### Example

79 

80```http57```http

81curl https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \58curl https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \

82 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \59 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

70 70 

71### Example71### Example

72 72 

73```http

74curl https://api.openai.com/v1/projects/$PROJECT_ID/roles/$ROLE_ID \

75 -H 'Content-Type: application/json' \

76 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

77 -d '{}'

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "id": "id",

85 "description": "description",

86 "name": "name",

87 "object": "role",

88 "permissions": [

89 "string"

90 ],

91 "predefined_role": true,

92 "resource_type": "resource_type"

93}

94```

95 

96### Example

97 

98```http73```http

99curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \74curl -X POST https://api.openai.com/v1/projects/proj_abc123/roles/role_01J1F8PROJ \

100 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \75 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts \

83 -H 'Content-Type: application/json' \

84 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

85 -d '{

86 "name": "name"

87 }'

88```

89 

90#### 200 — Example

91 

92```json

93{

94 "id": "id",

95 "api_key": {

96 "id": "id",

97 "created_at": 0,

98 "name": "name",

99 "object": "organization.project.service_account.api_key",

100 "value": "value",

101 "expires_at": 0

102 },

103 "created_at": 0,

104 "name": "name",

105 "object": "organization.project.service_account",

106 "role": "member"

107}

108```

109 

110### Example

111 

112```http81```http

113curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts \82curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts \

114 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

31 31 

32### Example32### Example

33 33 

34```http

35curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID \

36 -X DELETE \

37 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

38```

39 

40#### 200 — Example

41 

42```json

43{

44 "id": "id",

45 "deleted": true,

46 "object": "organization.project.service_account.deleted"

47}

48```

49 

50### Example

51 

52```http34```http

53curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \35curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \

54 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

68 68 

69### Example69### Example

70 70 

71```http

72curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts \

73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

74```

75 

76#### 200 — Example

77 

78```json

79{

80 "data": [

81 {

82 "id": "id",

83 "created_at": 0,

84 "name": "name",

85 "object": "organization.project.service_account",

86 "role": "owner"

87 }

88 ],

89 "has_more": true,

90 "object": "list",

91 "first_id": "first_id",

92 "last_id": "last_id"

93}

94```

95 

96### Example

97 

98```http71```http

99curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20 \72curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20 \

100 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

54 54 

55### Example55### Example

56 56 

57```http

58curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID \

59 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

60```

61 

62#### 200 — Example

63 

64```json

65{

66 "id": "id",

67 "created_at": 0,

68 "name": "name",

69 "object": "organization.project.service_account",

70 "role": "owner"

71}

72```

73 

74### Example

75 

76```http57```http

77curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \58curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \

78 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \59 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

70 70 

71### Example71### Example

72 72 

73```http

74curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID \

75 -H 'Content-Type: application/json' \

76 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

77 -d '{}'

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "id": "id",

85 "created_at": 0,

86 "name": "name",

87 "object": "organization.project.service_account",

88 "role": "owner"

89}

90```

91 

92### Example

93 

94```http73```http

95curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \74curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc \

96 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \75 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

68 68 

69### Example69### Example

70 70 

71```http

72curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_accounts/$SERVICE_ACCOUNT_ID/api_keys \

73 -X POST \

74 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

75```

76 

77#### 200 — Example

78 

79```json

80{

81 "id": "id",

82 "created_at": 0,

83 "name": "name",

84 "object": "organization.project.service_account.api_key",

85 "value": "value",

86 "expires_at": 0

87}

88```

89 

90### Example

91 

92```http71```http

93curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc/api_keys \72curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/service_accounts/svc_acct_abc/api_keys \

94 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

48 48 

49### Example49### Example

50 50 

51```http

52curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_tier_settings \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

54```

55 

56#### 200 — Example

57 

58```json

59{

60 "default": "standard",

61 "enabled_tiers": "all",

62 "object": "project.service_tier_settings"

63}

64```

65 

66### Example

67 

68```http51```http

69curl https://api.openai.com/v1/organization/projects/proj_abc/service_tier_settings \52curl https://api.openai.com/v1/organization/projects/proj_abc/service_tier_settings \

70 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/service_tier_settings \

83 -H 'Content-Type: application/json' \

84 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

85 -d '{

86 "default": "standard"

87 }'

88```

89 

90#### 200 — Example

91 

92```json

93{

94 "default": "standard",

95 "enabled_tiers": "all",

96 "object": "project.service_tier_settings"

97}

98```

99 

100### Example

101 

102```http81```http

103curl https://api.openai.com/v1/organization/projects/proj_abc/service_tier_settings \82curl https://api.openai.com/v1/organization/projects/proj_abc/service_tier_settings \

104 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

104 104 

105### Example105### Example

106 106 

107```http

108curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_alerts \

109 -H 'Content-Type: application/json' \

110 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

111 -d '{

112 "currency": "USD",

113 "interval": "month",

114 "notification_channel": {

115 "recipients": [

116 "string"

117 ],

118 "type": "email"

119 },

120 "threshold_amount": 0

121 }'

122```

123 

124#### 200 — Example

125 

126```json

127{

128 "id": "id",

129 "currency": "USD",

130 "interval": "month",

131 "notification_channel": {

132 "recipients": [

133 "string"

134 ],

135 "type": "email",

136 "subject_prefix": "subject_prefix"

137 },

138 "object": "project.spend_alert",

139 "threshold_amount": 0

140}

141```

142 

143### Example

144 

145```http107```http

146curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts \108curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts \

147 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

38 38 

39### Example39### Example

40 40 

41```http

42curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_alerts/$ALERT_ID \

43 -X DELETE \

44 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

45```

46 

47#### 200 — Example

48 

49```json

50{

51 "id": "id",

52 "deleted": true,

53 "object": "project.spend_alert.deleted"

54}

55```

56 

57### Example

58 

59```http41```http

60curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \42curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \

61 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \43 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

106 106 

107### Example107### Example

108 108 

109```http

110curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_alerts \

111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

112```

113 

114#### 200 — Example

115 

116```json

117{

118 "data": [

119 {

120 "id": "id",

121 "currency": "USD",

122 "interval": "month",

123 "notification_channel": {

124 "recipients": [

125 "string"

126 ],

127 "type": "email",

128 "subject_prefix": "subject_prefix"

129 },

130 "object": "project.spend_alert",

131 "threshold_amount": 0

132 }

133 ],

134 "first_id": "first_id",

135 "has_more": true,

136 "last_id": "last_id",

137 "object": "list"

138}

139```

140 

141### Example

142 

143```http109```http

144curl https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts?limit=20&order=asc \110curl https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts?limit=20&order=asc \

145 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \111 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

68 68 

69### Example69### Example

70 70 

71```http

72curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_alerts/$ALERT_ID \

73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

74```

75 

76#### 200 — Example

77 

78```json

79{

80 "id": "id",

81 "currency": "USD",

82 "interval": "month",

83 "notification_channel": {

84 "recipients": [

85 "string"

86 ],

87 "type": "email",

88 "subject_prefix": "subject_prefix"

89 },

90 "object": "project.spend_alert",

91 "threshold_amount": 0

92}

93```

94 

95### Example

96 

97```http71```http

98curl https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \72curl https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \

99 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \73 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

108 108 

109### Example109### Example

110 110 

111```http

112curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_alerts/$ALERT_ID \

113 -H 'Content-Type: application/json' \

114 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

115 -d '{

116 "currency": "USD",

117 "interval": "month",

118 "notification_channel": {

119 "recipients": [

120 "string"

121 ],

122 "type": "email"

123 },

124 "threshold_amount": 0

125 }'

126```

127 

128#### 200 — Example

129 

130```json

131{

132 "id": "id",

133 "currency": "USD",

134 "interval": "month",

135 "notification_channel": {

136 "recipients": [

137 "string"

138 ],

139 "type": "email",

140 "subject_prefix": "subject_prefix"

141 },

142 "object": "project.spend_alert",

143 "threshold_amount": 0

144}

145```

146 

147### Example

148 

149```http111```http

150curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \112curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_alerts/alert_abc123 \

151 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \113 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_limit \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "deleted": true,

44 "object": "project.spend_limit.deleted"

45}

46```

47 

48### Example

49 

50```http33```http

51curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \34curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \

52 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \35 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

14 14 

15### Returns15### Returns

16 16 

17- `ProjectSpendLimit object { currency, enforcement, interval, 2 more }`17- `ProjectSpendLimit object { currency, enforcement, interval, 3 more }`

18 18 

19 Represents a hard spend limit configured at the project level.19 Represents a hard spend limit configured at the project level.

20 20 


60 60 

61 - `"month"`61 - `"month"`

62 62 

63 - `notification_channel: object { recipients, type, subject_prefix }`

64 

65 Email notifications sent when the hard spend limit is reached.

66 

67 - `recipients: array of string`

68 

69 - `type: "email" (default: "email")`

70 

71 - `"email"`

72 

73 - `subject_prefix: optional string or null`

74 

63 - `object: "project.spend_limit" (default: "project.spend_limit")`75 - `object: "project.spend_limit" (default: "project.spend_limit")`

64 76 

65 The object type, which is always `project.spend_limit`.77 The object type, which is always `project.spend_limit`.


72 84 

73### Example85### Example

74 86 

75```http

76curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_limit \

77 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "currency": "USD",

85 "enforcement": {

86 "status": "inactive"

87 },

88 "interval": "month",

89 "object": "project.spend_limit",

90 "threshold_amount": 0

91}

92```

93 

94### Example

95 

96```http87```http

97curl https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \88curl https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \

98 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \89 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

34 34 

35 `minimum: 1`35 `minimum: 1`

36 36 

37- `notification_channel: optional object { } or null`

38 

39 Configure email notifications when the spend limit is reached. Leave this out to keep the current settings, or send null to reset to owner-only notifications.

40 

37### Returns41### Returns

38 42 

39- `ProjectSpendLimit object { currency, enforcement, interval, 2 more }`43- `ProjectSpendLimit object { currency, enforcement, interval, 3 more }`

40 44 

41 Represents a hard spend limit configured at the project level.45 Represents a hard spend limit configured at the project level.

42 46 


82 86 

83 - `"month"`87 - `"month"`

84 88 

89 - `notification_channel: object { recipients, type, subject_prefix }`

90 

91 Email notifications sent when the hard spend limit is reached.

92 

93 - `recipients: array of string`

94 

95 - `type: "email" (default: "email")`

96 

97 - `"email"`

98 

99 - `subject_prefix: optional string or null`

100 

85 - `object: "project.spend_limit" (default: "project.spend_limit")`101 - `object: "project.spend_limit" (default: "project.spend_limit")`

86 102 

87 The object type, which is always `project.spend_limit`.103 The object type, which is always `project.spend_limit`.


94 110 

95### Example111### Example

96 112 

97```http

98curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/spend_limit \

99 -H 'Content-Type: application/json' \

100 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

101 -d '{

102 "currency": "USD",

103 "interval": "month",

104 "threshold_amount": 1

105 }'

106```

107 

108#### 200 — Example

109 

110```json

111{

112 "currency": "USD",

113 "enforcement": {

114 "status": "inactive"

115 },

116 "interval": "month",

117 "object": "project.spend_limit",

118 "threshold_amount": 0

119}

120```

121 

122### Example

123 

124```http113```http

125curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \114curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/spend_limit \

126 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \115 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

64 64 

65### Example65### Example

66 66 

67```http

68curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users \

69 -H 'Content-Type: application/json' \

70 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

71 -d '{

72 "role": "role"

73 }'

74```

75 

76#### 200 — Example

77 

78```json

79{

80 "id": "id",

81 "added_at": 0,

82 "object": "organization.project.user",

83 "role": "role",

84 "email": "email",

85 "name": "name"

86}

87```

88 

89### Example

90 

91```http67```http

92curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users \68curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users \

93 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

31 31 

32### Example32### Example

33 33 

34```http

35curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users/$USER_ID \

36 -X DELETE \

37 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

38```

39 

40#### 200 — Example

41 

42```json

43{

44 "id": "id",

45 "deleted": true,

46 "object": "organization.project.user.deleted"

47}

48```

49 

50### Example

51 

52```http34```http

53curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \35curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \

54 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

64 64 

65### Example65### Example

66 66 

67```http

68curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users \

69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

70```

71 

72#### 200 — Example

73 

74```json

75{

76 "data": [

77 {

78 "id": "id",

79 "added_at": 0,

80 "object": "organization.project.user",

81 "role": "role",

82 "email": "email",

83 "name": "name"

84 }

85 ],

86 "has_more": true,

87 "object": "object",

88 "first_id": "first_id",

89 "last_id": "last_id"

90}

91```

92 

93### Example

94 

95```http67```http

96curl https://api.openai.com/v1/organization/projects/proj_abc/users?after=user_abc&limit=20 \68curl https://api.openai.com/v1/organization/projects/proj_abc/users?after=user_abc&limit=20 \

97 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

52 52 

53### Example53### Example

54 54 

55```http

56curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users/$USER_ID \

57 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

58```

59 

60#### 200 — Example

61 

62```json

63{

64 "id": "id",

65 "added_at": 0,

66 "object": "organization.project.user",

67 "role": "role",

68 "email": "email",

69 "name": "name"

70}

71```

72 

73### Example

74 

75```http55```http

76curl https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \56curl https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \

77 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \57 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

60 60 

61### Example61### Example

62 62 

63```http

64curl https://api.openai.com/v1/organization/projects/$PROJECT_ID/users/$USER_ID \

65 -H 'Content-Type: application/json' \

66 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

67 -d '{}'

68```

69 

70#### 200 — Example

71 

72```json

73{

74 "id": "id",

75 "added_at": 0,

76 "object": "organization.project.user",

77 "role": "role",

78 "email": "email",

79 "name": "name"

80}

81```

82 

83### Example

84 

85```http63```http

86curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \64curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \

87 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \65 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

176 176 

177### Example177### Example

178 178 

179```http

180curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles \

181 -H 'Content-Type: application/json' \

182 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

183 -d '{

184 "role_id": "role_id"

185 }'

186```

187 

188#### 200 — Example

189 

190```json

191{

192 "object": "user.role",

193 "role": {

194 "id": "id",

195 "description": "description",

196 "name": "name",

197 "object": "role",

198 "permissions": [

199 "string"

200 ],

201 "predefined_role": true,

202 "resource_type": "resource_type"

203 },

204 "user": {

205 "id": "id",

206 "added_at": 0,

207 "object": "organization.user",

208 "api_key_last_used_at": 0,

209 "created": 0,

210 "developer_persona": "developer_persona",

211 "email": "email",

212 "is_default": true,

213 "is_scale_tier_authorized_purchaser": true,

214 "is_scim_managed": true,

215 "is_service_account": true,

216 "name": "name",

217 "projects": {

218 "data": [

219 {

220 "id": "id",

221 "name": "name",

222 "role": "role"

223 }

224 ],

225 "object": "list"

226 },

227 "role": "role",

228 "technical_level": "technical_level",

229 "user": {

230 "id": "id",

231 "object": "user",

232 "banned": true,

233 "banned_at": 0,

234 "email": "email",

235 "enabled": true,

236 "name": "name",

237 "picture": "picture"

238 }

239 }

240}

241```

242 

243### Example

244 

245```http179```http

246curl -X POST https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \180curl -X POST https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \

247 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \181 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

32 32 

33### Example33### Example

34 34 

35```http

36curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles/$ROLE_ID \

37 -X DELETE \

38 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

39```

40 

41#### 200 — Example

42 

43```json

44{

45 "deleted": true,

46 "object": "object"

47}

48```

49 

50### Example

51 

52```http35```http

53curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles/role_01J1F8PROJ \36curl -X DELETE https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles/role_01J1F8PROJ \

54 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \37 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

114 114 

115### Example115### Example

116 116 

117```http

118curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles \

119 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

120```

121 

122#### 200 — Example

123 

124```json

125{

126 "data": [

127 {

128 "id": "id",

129 "assignment_sources": [

130 {

131 "principal_id": "principal_id",

132 "principal_type": "principal_type"

133 }

134 ],

135 "created_at": 0,

136 "created_by": "created_by",

137 "created_by_user_obj": {

138 "foo": "bar"

139 },

140 "description": "description",

141 "metadata": {

142 "foo": "bar"

143 },

144 "name": "name",

145 "permissions": [

146 "string"

147 ],

148 "predefined_role": true,

149 "resource_type": "resource_type",

150 "updated_at": 0

151 }

152 ],

153 "has_more": true,

154 "next": "next",

155 "object": "list"

156}

157```

158 

159### Example

160 

161```http117```http

162curl https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \118curl https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles \

163 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \119 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

80 80 

81### Example81### Example

82 82 

83```http

84curl https://api.openai.com/v1/projects/$PROJECT_ID/users/$USER_ID/roles/$ROLE_ID \

85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

86```

87 

88#### 200 — Example

89 

90```json

91{

92 "id": "id",

93 "assignment_sources": [

94 {

95 "principal_id": "principal_id",

96 "principal_type": "principal_type"

97 }

98 ],

99 "created_at": 0,

100 "created_by": "created_by",

101 "created_by_user_obj": {

102 "foo": "bar"

103 },

104 "description": "description",

105 "metadata": {

106 "foo": "bar"

107 },

108 "name": "name",

109 "permissions": [

110 "string"

111 ],

112 "predefined_role": true,

113 "resource_type": "resource_type",

114 "updated_at": 0

115}

116```

117 

118### Example

119 

120```http83```http

121curl https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles/role_01J1F8PROJ \84curl https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles/role_01J1F8PROJ \

122 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \85 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

60 60 

61### Example61### Example

62 62 

63```http

64curl https://api.openai.com/v1/organization/roles \

65 -H 'Content-Type: application/json' \

66 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

67 -d '{

68 "permissions": [

69 "string"

70 ],

71 "role_name": "role_name"

72 }'

73```

74 

75#### 200 — Example

76 

77```json

78{

79 "id": "id",

80 "description": "description",

81 "name": "name",

82 "object": "role",

83 "permissions": [

84 "string"

85 ],

86 "predefined_role": true,

87 "resource_type": "resource_type"

88}

89```

90 

91### Example

92 

93```http63```http

94curl -X POST https://api.openai.com/v1/organization/roles \64curl -X POST https://api.openai.com/v1/organization/roles \

95 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \65 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/organization/roles/$ROLE_ID \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "id": "id",

44 "deleted": true,

45 "object": "role.deleted"

46}

47```

48 

49### Example

50 

51```http33```http

52curl -X DELETE https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \34curl -X DELETE https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \35 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/organization/roles \

83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

84```

85 

86#### 200 — Example

87 

88```json

89{

90 "data": [

91 {

92 "id": "id",

93 "description": "description",

94 "name": "name",

95 "object": "role",

96 "permissions": [

97 "string"

98 ],

99 "predefined_role": true,

100 "resource_type": "resource_type"

101 }

102 ],

103 "has_more": true,

104 "next": "next",

105 "object": "list"

106}

107```

108 

109### Example

110 

111```http81```http

112curl https://api.openai.com/v1/organization/roles?limit=20 \82curl https://api.openai.com/v1/organization/roles?limit=20 \

113 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

50 50 

51### Example51### Example

52 52 

53```http

54curl https://api.openai.com/v1/organization/roles/$ROLE_ID \

55 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

56```

57 

58#### 200 — Example

59 

60```json

61{

62 "id": "id",

63 "description": "description",

64 "name": "name",

65 "object": "role",

66 "permissions": [

67 "string"

68 ],

69 "predefined_role": true,

70 "resource_type": "resource_type"

71}

72```

73 

74### Example

75 

76```http53```http

77curl https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \54curl https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \

78 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \55 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

66 66 

67### Example67### Example

68 68 

69```http

70curl https://api.openai.com/v1/organization/roles/$ROLE_ID \

71 -H 'Content-Type: application/json' \

72 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

73 -d '{}'

74```

75 

76#### 200 — Example

77 

78```json

79{

80 "id": "id",

81 "description": "description",

82 "name": "name",

83 "object": "role",

84 "permissions": [

85 "string"

86 ],

87 "predefined_role": true,

88 "resource_type": "resource_type"

89}

90```

91 

92### Example

93 

94```http69```http

95curl -X POST https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \70curl -X POST https://api.openai.com/v1/organization/roles/role_01J1F8ROLE01 \

96 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

98 98 

99### Example99### Example

100 100 

101```http

102curl https://api.openai.com/v1/organization/spend_alerts \

103 -H 'Content-Type: application/json' \

104 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

105 -d '{

106 "currency": "USD",

107 "interval": "month",

108 "notification_channel": {

109 "recipients": [

110 "string"

111 ],

112 "type": "email"

113 },

114 "threshold_amount": 0

115 }'

116```

117 

118#### 200 — Example

119 

120```json

121{

122 "id": "id",

123 "currency": "USD",

124 "interval": "month",

125 "notification_channel": {

126 "recipients": [

127 "string"

128 ],

129 "type": "email",

130 "subject_prefix": "subject_prefix"

131 },

132 "object": "organization.spend_alert",

133 "threshold_amount": 0

134}

135```

136 

137### Example

138 

139```http101```http

140curl -X POST https://api.openai.com/v1/organization/spend_alerts \102curl -X POST https://api.openai.com/v1/organization/spend_alerts \

141 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \103 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

34 34 

35### Example35### Example

36 36 

37```http

38curl https://api.openai.com/v1/organization/spend_alerts/$ALERT_ID \

39 -X DELETE \

40 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

41```

42 

43#### 200 — Example

44 

45```json

46{

47 "id": "id",

48 "deleted": true,

49 "object": "organization.spend_alert.deleted"

50}

51```

52 

53### Example

54 

55```http37```http

56curl -X DELETE https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \38curl -X DELETE https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \

57 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \39 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

100 100 

101### Example101### Example

102 102 

103```http

104curl https://api.openai.com/v1/organization/spend_alerts \

105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

106```

107 

108#### 200 — Example

109 

110```json

111{

112 "data": [

113 {

114 "id": "id",

115 "currency": "USD",

116 "interval": "month",

117 "notification_channel": {

118 "recipients": [

119 "string"

120 ],

121 "type": "email",

122 "subject_prefix": "subject_prefix"

123 },

124 "object": "organization.spend_alert",

125 "threshold_amount": 0

126 }

127 ],

128 "first_id": "first_id",

129 "has_more": true,

130 "last_id": "last_id",

131 "object": "list"

132}

133```

134 

135### Example

136 

137```http103```http

138curl https://api.openai.com/v1/organization/spend_alerts?limit=20&order=asc \104curl https://api.openai.com/v1/organization/spend_alerts?limit=20&order=asc \

139 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

64 64 

65### Example65### Example

66 66 

67```http

68curl https://api.openai.com/v1/organization/spend_alerts/$ALERT_ID \

69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

70```

71 

72#### 200 — Example

73 

74```json

75{

76 "id": "id",

77 "currency": "USD",

78 "interval": "month",

79 "notification_channel": {

80 "recipients": [

81 "string"

82 ],

83 "type": "email",

84 "subject_prefix": "subject_prefix"

85 },

86 "object": "organization.spend_alert",

87 "threshold_amount": 0

88}

89```

90 

91### Example

92 

93```http67```http

94curl https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \68curl https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \

95 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \69 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

104 104 

105### Example105### Example

106 106 

107```http

108curl https://api.openai.com/v1/organization/spend_alerts/$ALERT_ID \

109 -H 'Content-Type: application/json' \

110 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

111 -d '{

112 "currency": "USD",

113 "interval": "month",

114 "notification_channel": {

115 "recipients": [

116 "string"

117 ],

118 "type": "email"

119 },

120 "threshold_amount": 0

121 }'

122```

123 

124#### 200 — Example

125 

126```json

127{

128 "id": "id",

129 "currency": "USD",

130 "interval": "month",

131 "notification_channel": {

132 "recipients": [

133 "string"

134 ],

135 "type": "email",

136 "subject_prefix": "subject_prefix"

137 },

138 "object": "organization.spend_alert",

139 "threshold_amount": 0

140}

141```

142 

143### Example

144 

145```http107```http

146curl -X POST https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \108curl -X POST https://api.openai.com/v1/organization/spend_alerts/alert_abc123 \

147 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

24 24 

25### Example25### Example

26 26 

27```http

28curl https://api.openai.com/v1/organization/spend_limit \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "deleted": true,

38 "object": "organization.spend_limit.deleted"

39}

40```

41 

42### Example

43 

44```http27```http

45curl -X DELETE https://api.openai.com/v1/organization/spend_limit \28curl -X DELETE https://api.openai.com/v1/organization/spend_limit \

46 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \29 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

8 8 

9### Returns9### Returns

10 10 

11- `OrganizationSpendLimit object { currency, enforcement, interval, 2 more }`11- `OrganizationSpendLimit object { currency, enforcement, interval, 3 more }`

12 12 

13 Represents a hard spend limit configured at the organization level.13 Represents a hard spend limit configured at the organization level.

14 14 


54 54 

55 - `"month"`55 - `"month"`

56 56 

57 - `notification_channel: object { recipients, type, subject_prefix }`

58 

59 Email notifications sent when the hard spend limit is reached.

60 

61 - `recipients: array of string`

62 

63 - `type: "email" (default: "email")`

64 

65 - `"email"`

66 

67 - `subject_prefix: optional string or null`

68 

57 - `object: "organization.spend_limit" (default: "organization.spend_limit")`69 - `object: "organization.spend_limit" (default: "organization.spend_limit")`

58 70 

59 The object type, which is always `organization.spend_limit`.71 The object type, which is always `organization.spend_limit`.


66 78 

67### Example79### Example

68 80 

69```http

70curl https://api.openai.com/v1/organization/spend_limit \

71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

72```

73 

74#### 200 — Example

75 

76```json

77{

78 "currency": "USD",

79 "enforcement": {

80 "status": "inactive"

81 },

82 "interval": "month",

83 "object": "organization.spend_limit",

84 "threshold_amount": 0

85}

86```

87 

88### Example

89 

90```http81```http

91curl https://api.openai.com/v1/organization/spend_limit \82curl https://api.openai.com/v1/organization/spend_limit \

92 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \83 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

28 28 

29 `minimum: 1`29 `minimum: 1`

30 30 

31- `notification_channel: optional object { } or null`

32 

33 Configure email notifications when the spend limit is reached. Leave this out to keep the current settings, or send null to reset to owner-only notifications.

34 

31### Returns35### Returns

32 36 

33- `OrganizationSpendLimit object { currency, enforcement, interval, 2 more }`37- `OrganizationSpendLimit object { currency, enforcement, interval, 3 more }`

34 38 

35 Represents a hard spend limit configured at the organization level.39 Represents a hard spend limit configured at the organization level.

36 40 


76 80 

77 - `"month"`81 - `"month"`

78 82 

83 - `notification_channel: object { recipients, type, subject_prefix }`

84 

85 Email notifications sent when the hard spend limit is reached.

86 

87 - `recipients: array of string`

88 

89 - `type: "email" (default: "email")`

90 

91 - `"email"`

92 

93 - `subject_prefix: optional string or null`

94 

79 - `object: "organization.spend_limit" (default: "organization.spend_limit")`95 - `object: "organization.spend_limit" (default: "organization.spend_limit")`

80 96 

81 The object type, which is always `organization.spend_limit`.97 The object type, which is always `organization.spend_limit`.


88 104 

89### Example105### Example

90 106 

91```http

92curl https://api.openai.com/v1/organization/spend_limit \

93 -H 'Content-Type: application/json' \

94 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

95 -d '{

96 "currency": "USD",

97 "interval": "month",

98 "threshold_amount": 1

99 }'

100```

101 

102#### 200 — Example

103 

104```json

105{

106 "currency": "USD",

107 "enforcement": {

108 "status": "inactive"

109 },

110 "interval": "month",

111 "object": "organization.spend_limit",

112 "threshold_amount": 0

113}

114```

115 

116### Example

117 

118```http107```http

119curl -X POST https://api.openai.com/v1/organization/spend_limit \108curl -X POST https://api.openai.com/v1/organization/spend_limit \

120 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \109 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

546 546 

547### Example547### Example

548 548 

549```http

550curl "https://api.openai.com/v1/organization/usage/audio_speeches?start_time=0" \

551 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

552```

553 

554#### 200 — Example

555 

556```json

557{

558 "data": [

559 {

560 "end_time": 0,

561 "object": "bucket",

562 "results": [

563 {

564 "input_tokens": 0,

565 "num_model_requests": 0,

566 "object": "organization.usage.completions.result",

567 "output_tokens": 0,

568 "api_key_id": "api_key_id",

569 "api_source": "agents_api",

570 "batch": true,

571 "input_audio_tokens": 0,

572 "input_cache_write_12h_tokens": 0,

573 "input_cache_write_30m_tokens": 0,

574 "input_cache_write_tokens": 0,

575 "input_cached_audio_tokens": 0,

576 "input_cached_image_tokens": 0,

577 "input_cached_text_tokens": 0,

578 "input_cached_tokens": 0,

579 "input_image_tokens": 0,

580 "input_text_tokens": 0,

581 "input_uncached_tokens": 0,

582 "model": "model",

583 "output_audio_tokens": 0,

584 "output_image_tokens": 0,

585 "output_text_tokens": 0,

586 "project_id": "project_id",

587 "service_tier": "service_tier",

588 "user_id": "user_id"

589 }

590 ],

591 "start_time": 0

592 }

593 ],

594 "has_more": true,

595 "next_page": "next_page",

596 "object": "page"

597}

598```

599 

600### Example

601 

602```http549```http

603curl "https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1" \550curl "https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1" \

604-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \551-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

546 546 

547### Example547### Example

548 548 

549```http

550curl "https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=0" \

551 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

552```

553 

554#### 200 — Example

555 

556```json

557{

558 "data": [

559 {

560 "end_time": 0,

561 "object": "bucket",

562 "results": [

563 {

564 "input_tokens": 0,

565 "num_model_requests": 0,

566 "object": "organization.usage.completions.result",

567 "output_tokens": 0,

568 "api_key_id": "api_key_id",

569 "api_source": "agents_api",

570 "batch": true,

571 "input_audio_tokens": 0,

572 "input_cache_write_12h_tokens": 0,

573 "input_cache_write_30m_tokens": 0,

574 "input_cache_write_tokens": 0,

575 "input_cached_audio_tokens": 0,

576 "input_cached_image_tokens": 0,

577 "input_cached_text_tokens": 0,

578 "input_cached_tokens": 0,

579 "input_image_tokens": 0,

580 "input_text_tokens": 0,

581 "input_uncached_tokens": 0,

582 "model": "model",

583 "output_audio_tokens": 0,

584 "output_image_tokens": 0,

585 "output_text_tokens": 0,

586 "project_id": "project_id",

587 "service_tier": "service_tier",

588 "user_id": "user_id"

589 }

590 ],

591 "start_time": 0

592 }

593 ],

594 "has_more": true,

595 "next_page": "next_page",

596 "object": "page"

597}

598```

599 

600### Example

601 

602```http549```http

603curl "https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1" \550curl "https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1" \

604-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \551-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

528 528 

529### Example529### Example

530 530 

531```http

532curl "https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=0" \

533 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

534```

535 

536#### 200 — Example

537 

538```json

539{

540 "data": [

541 {

542 "end_time": 0,

543 "object": "bucket",

544 "results": [

545 {

546 "input_tokens": 0,

547 "num_model_requests": 0,

548 "object": "organization.usage.completions.result",

549 "output_tokens": 0,

550 "api_key_id": "api_key_id",

551 "api_source": "agents_api",

552 "batch": true,

553 "input_audio_tokens": 0,

554 "input_cache_write_12h_tokens": 0,

555 "input_cache_write_30m_tokens": 0,

556 "input_cache_write_tokens": 0,

557 "input_cached_audio_tokens": 0,

558 "input_cached_image_tokens": 0,

559 "input_cached_text_tokens": 0,

560 "input_cached_tokens": 0,

561 "input_image_tokens": 0,

562 "input_text_tokens": 0,

563 "input_uncached_tokens": 0,

564 "model": "model",

565 "output_audio_tokens": 0,

566 "output_image_tokens": 0,

567 "output_text_tokens": 0,

568 "project_id": "project_id",

569 "service_tier": "service_tier",

570 "user_id": "user_id"

571 }

572 ],

573 "start_time": 0

574 }

575 ],

576 "has_more": true,

577 "next_page": "next_page",

578 "object": "page"

579}

580```

581 

582### Example

583 

584```http531```http

585curl "https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1" \532curl "https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1" \

586-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \533-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

556 556 

557### Example557### Example

558 558 

559```http

560curl "https://api.openai.com/v1/organization/usage/completions?start_time=0" \

561 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

562```

563 

564#### 200 — Example

565 

566```json

567{

568 "data": [

569 {

570 "end_time": 0,

571 "object": "bucket",

572 "results": [

573 {

574 "input_tokens": 0,

575 "num_model_requests": 0,

576 "object": "organization.usage.completions.result",

577 "output_tokens": 0,

578 "api_key_id": "api_key_id",

579 "api_source": "agents_api",

580 "batch": true,

581 "input_audio_tokens": 0,

582 "input_cache_write_12h_tokens": 0,

583 "input_cache_write_30m_tokens": 0,

584 "input_cache_write_tokens": 0,

585 "input_cached_audio_tokens": 0,

586 "input_cached_image_tokens": 0,

587 "input_cached_text_tokens": 0,

588 "input_cached_tokens": 0,

589 "input_image_tokens": 0,

590 "input_text_tokens": 0,

591 "input_uncached_tokens": 0,

592 "model": "model",

593 "output_audio_tokens": 0,

594 "output_image_tokens": 0,

595 "output_text_tokens": 0,

596 "project_id": "project_id",

597 "service_tier": "service_tier",

598 "user_id": "user_id"

599 }

600 ],

601 "start_time": 0

602 }

603 ],

604 "has_more": true,

605 "next_page": "next_page",

606 "object": "page"

607}

608```

609 

610### Example

611 

612```http559```http

613curl "https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1" \560curl "https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1" \

614-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \561-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

46 46 

47- `line_items: optional array of string`47- `line_items: optional array of string`

48 48 

49 Return only costs for these exact line item names. Each value must match the complete `line_item` value, for example `gpt-6-astra, input_tokens`.49 Return only costs for these exact line item names. Each value must match the complete `line_item` value, for example `gpt-6.2-astra, input_tokens`.

50 50 

51- `page: optional string`51- `page: optional string`

52 52 


536 536 

537### Example537### Example

538 538 

539```http

540curl "https://api.openai.com/v1/organization/costs?start_time=0" \

541 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

542```

543 

544#### 200 — Example

545 

546```json

547{

548 "data": [

549 {

550 "end_time": 0,

551 "object": "bucket",

552 "results": [

553 {

554 "input_tokens": 0,

555 "num_model_requests": 0,

556 "object": "organization.usage.completions.result",

557 "output_tokens": 0,

558 "api_key_id": "api_key_id",

559 "api_source": "agents_api",

560 "batch": true,

561 "input_audio_tokens": 0,

562 "input_cache_write_12h_tokens": 0,

563 "input_cache_write_30m_tokens": 0,

564 "input_cache_write_tokens": 0,

565 "input_cached_audio_tokens": 0,

566 "input_cached_image_tokens": 0,

567 "input_cached_text_tokens": 0,

568 "input_cached_tokens": 0,

569 "input_image_tokens": 0,

570 "input_text_tokens": 0,

571 "input_uncached_tokens": 0,

572 "model": "model",

573 "output_audio_tokens": 0,

574 "output_image_tokens": 0,

575 "output_text_tokens": 0,

576 "project_id": "project_id",

577 "service_tier": "service_tier",

578 "user_id": "user_id"

579 }

580 ],

581 "start_time": 0

582 }

583 ],

584 "has_more": true,

585 "next_page": "next_page",

586 "object": "page"

587}

588```

589 

590### Example

591 

592```http539```http

593curl "https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1" \540curl "https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1" \

594-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \541-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

204 204 

205### Example205### Example

206 206 

207```http

208curl "https://api.openai.com/v1/organization/usage/decisions?start_time=0" \

209 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

210```

211 

212#### 200 — Example

213 

214```json

215{

216 "data": [

217 {

218 "end_time": 0,

219 "object": "bucket",

220 "results": [

221 {

222 "input_tokens": 0,

223 "num_model_requests": 0,

224 "object": "organization.usage.decisions.result",

225 "output_tokens": 0,

226 "api_key_id": "api_key_id",

227 "api_source": "agents_api",

228 "batch": true,

229 "input_audio_tokens": 0,

230 "input_cache_write_12h_tokens": 0,

231 "input_cache_write_30m_tokens": 0,

232 "input_cache_write_tokens": 0,

233 "input_cached_audio_tokens": 0,

234 "input_cached_image_tokens": 0,

235 "input_cached_text_tokens": 0,

236 "input_cached_tokens": 0,

237 "input_image_tokens": 0,

238 "input_text_tokens": 0,

239 "input_uncached_tokens": 0,

240 "model": "model",

241 "output_audio_tokens": 0,

242 "output_image_tokens": 0,

243 "output_text_tokens": 0,

244 "project_id": "project_id",

245 "service_tier": "service_tier",

246 "user_id": "user_id"

247 }

248 ],

249 "start_time": 0

250 }

251 ],

252 "has_more": true,

253 "next_page": "next_page",

254 "object": "page"

255}

256```

257 

258### Example

259 

260```http207```http

261curl --get "https://api.openai.com/v1/organization/usage/decisions" \208curl --get "https://api.openai.com/v1/organization/usage/decisions" \

262 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \209 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

546 546 

547### Example547### Example

548 548 

549```http

550curl "https://api.openai.com/v1/organization/usage/embeddings?start_time=0" \

551 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

552```

553 

554#### 200 — Example

555 

556```json

557{

558 "data": [

559 {

560 "end_time": 0,

561 "object": "bucket",

562 "results": [

563 {

564 "input_tokens": 0,

565 "num_model_requests": 0,

566 "object": "organization.usage.completions.result",

567 "output_tokens": 0,

568 "api_key_id": "api_key_id",

569 "api_source": "agents_api",

570 "batch": true,

571 "input_audio_tokens": 0,

572 "input_cache_write_12h_tokens": 0,

573 "input_cache_write_30m_tokens": 0,

574 "input_cache_write_tokens": 0,

575 "input_cached_audio_tokens": 0,

576 "input_cached_image_tokens": 0,

577 "input_cached_text_tokens": 0,

578 "input_cached_tokens": 0,

579 "input_image_tokens": 0,

580 "input_text_tokens": 0,

581 "input_uncached_tokens": 0,

582 "model": "model",

583 "output_audio_tokens": 0,

584 "output_image_tokens": 0,

585 "output_text_tokens": 0,

586 "project_id": "project_id",

587 "service_tier": "service_tier",

588 "user_id": "user_id"

589 }

590 ],

591 "start_time": 0

592 }

593 ],

594 "has_more": true,

595 "next_page": "next_page",

596 "object": "page"

597}

598```

599 

600### Example

601 

602```http549```http

603curl "https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1" \550curl "https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1" \

604-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \551-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

546 546 

547### Example547### Example

548 548 

549```http

550curl "https://api.openai.com/v1/organization/usage/file_search_calls?start_time=0" \

551 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

552```

553 

554#### 200 — Example

555 

556```json

557{

558 "data": [

559 {

560 "end_time": 0,

561 "object": "bucket",

562 "results": [

563 {

564 "input_tokens": 0,

565 "num_model_requests": 0,

566 "object": "organization.usage.completions.result",

567 "output_tokens": 0,

568 "api_key_id": "api_key_id",

569 "api_source": "agents_api",

570 "batch": true,

571 "input_audio_tokens": 0,

572 "input_cache_write_12h_tokens": 0,

573 "input_cache_write_30m_tokens": 0,

574 "input_cache_write_tokens": 0,

575 "input_cached_audio_tokens": 0,

576 "input_cached_image_tokens": 0,

577 "input_cached_text_tokens": 0,

578 "input_cached_tokens": 0,

579 "input_image_tokens": 0,

580 "input_text_tokens": 0,

581 "input_uncached_tokens": 0,

582 "model": "model",

583 "output_audio_tokens": 0,

584 "output_image_tokens": 0,

585 "output_text_tokens": 0,

586 "project_id": "project_id",

587 "service_tier": "service_tier",

588 "user_id": "user_id"

589 }

590 ],

591 "start_time": 0

592 }

593 ],

594 "has_more": true,

595 "next_page": "next_page",

596 "object": "page"

597}

598```

599 

600### Example

601 

602```http549```http

603curl "https://api.openai.com/v1/organization/usage/file_search_calls?start_time=1730419200&limit=1" \550curl "https://api.openai.com/v1/organization/usage/file_search_calls?start_time=1730419200&limit=1" \

604-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \551-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

574 574 

575### Example575### Example

576 576 

577```http

578curl "https://api.openai.com/v1/organization/usage/images?start_time=0" \

579 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

580```

581 

582#### 200 — Example

583 

584```json

585{

586 "data": [

587 {

588 "end_time": 0,

589 "object": "bucket",

590 "results": [

591 {

592 "input_tokens": 0,

593 "num_model_requests": 0,

594 "object": "organization.usage.completions.result",

595 "output_tokens": 0,

596 "api_key_id": "api_key_id",

597 "api_source": "agents_api",

598 "batch": true,

599 "input_audio_tokens": 0,

600 "input_cache_write_12h_tokens": 0,

601 "input_cache_write_30m_tokens": 0,

602 "input_cache_write_tokens": 0,

603 "input_cached_audio_tokens": 0,

604 "input_cached_image_tokens": 0,

605 "input_cached_text_tokens": 0,

606 "input_cached_tokens": 0,

607 "input_image_tokens": 0,

608 "input_text_tokens": 0,

609 "input_uncached_tokens": 0,

610 "model": "model",

611 "output_audio_tokens": 0,

612 "output_image_tokens": 0,

613 "output_text_tokens": 0,

614 "project_id": "project_id",

615 "service_tier": "service_tier",

616 "user_id": "user_id"

617 }

618 ],

619 "start_time": 0

620 }

621 ],

622 "has_more": true,

623 "next_page": "next_page",

624 "object": "page"

625}

626```

627 

628### Example

629 

630```http577```http

631curl "https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1" \578curl "https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1" \

632-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \579-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

546 546 

547### Example547### Example

548 548 

549```http

550curl "https://api.openai.com/v1/organization/usage/moderations?start_time=0" \

551 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

552```

553 

554#### 200 — Example

555 

556```json

557{

558 "data": [

559 {

560 "end_time": 0,

561 "object": "bucket",

562 "results": [

563 {

564 "input_tokens": 0,

565 "num_model_requests": 0,

566 "object": "organization.usage.completions.result",

567 "output_tokens": 0,

568 "api_key_id": "api_key_id",

569 "api_source": "agents_api",

570 "batch": true,

571 "input_audio_tokens": 0,

572 "input_cache_write_12h_tokens": 0,

573 "input_cache_write_30m_tokens": 0,

574 "input_cache_write_tokens": 0,

575 "input_cached_audio_tokens": 0,

576 "input_cached_image_tokens": 0,

577 "input_cached_text_tokens": 0,

578 "input_cached_tokens": 0,

579 "input_image_tokens": 0,

580 "input_text_tokens": 0,

581 "input_uncached_tokens": 0,

582 "model": "model",

583 "output_audio_tokens": 0,

584 "output_image_tokens": 0,

585 "output_text_tokens": 0,

586 "project_id": "project_id",

587 "service_tier": "service_tier",

588 "user_id": "user_id"

589 }

590 ],

591 "start_time": 0

592 }

593 ],

594 "has_more": true,

595 "next_page": "next_page",

596 "object": "page"

597}

598```

599 

600### Example

601 

602```http549```http

603curl "https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1" \550curl "https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1" \

604-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \551-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

528 528 

529### Example529### Example

530 530 

531```http

532curl "https://api.openai.com/v1/organization/usage/vector_stores?start_time=0" \

533 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

534```

535 

536#### 200 — Example

537 

538```json

539{

540 "data": [

541 {

542 "end_time": 0,

543 "object": "bucket",

544 "results": [

545 {

546 "input_tokens": 0,

547 "num_model_requests": 0,

548 "object": "organization.usage.completions.result",

549 "output_tokens": 0,

550 "api_key_id": "api_key_id",

551 "api_source": "agents_api",

552 "batch": true,

553 "input_audio_tokens": 0,

554 "input_cache_write_12h_tokens": 0,

555 "input_cache_write_30m_tokens": 0,

556 "input_cache_write_tokens": 0,

557 "input_cached_audio_tokens": 0,

558 "input_cached_image_tokens": 0,

559 "input_cached_text_tokens": 0,

560 "input_cached_tokens": 0,

561 "input_image_tokens": 0,

562 "input_text_tokens": 0,

563 "input_uncached_tokens": 0,

564 "model": "model",

565 "output_audio_tokens": 0,

566 "output_image_tokens": 0,

567 "output_text_tokens": 0,

568 "project_id": "project_id",

569 "service_tier": "service_tier",

570 "user_id": "user_id"

571 }

572 ],

573 "start_time": 0

574 }

575 ],

576 "has_more": true,

577 "next_page": "next_page",

578 "object": "page"

579}

580```

581 

582### Example

583 

584```http531```http

585curl "https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1" \532curl "https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1" \

586-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \533-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

560 560 

561### Example561### Example

562 562 

563```http

564curl "https://api.openai.com/v1/organization/usage/web_search_calls?start_time=0" \

565 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

566```

567 

568#### 200 — Example

569 

570```json

571{

572 "data": [

573 {

574 "end_time": 0,

575 "object": "bucket",

576 "results": [

577 {

578 "input_tokens": 0,

579 "num_model_requests": 0,

580 "object": "organization.usage.completions.result",

581 "output_tokens": 0,

582 "api_key_id": "api_key_id",

583 "api_source": "agents_api",

584 "batch": true,

585 "input_audio_tokens": 0,

586 "input_cache_write_12h_tokens": 0,

587 "input_cache_write_30m_tokens": 0,

588 "input_cache_write_tokens": 0,

589 "input_cached_audio_tokens": 0,

590 "input_cached_image_tokens": 0,

591 "input_cached_text_tokens": 0,

592 "input_cached_tokens": 0,

593 "input_image_tokens": 0,

594 "input_text_tokens": 0,

595 "input_uncached_tokens": 0,

596 "model": "model",

597 "output_audio_tokens": 0,

598 "output_image_tokens": 0,

599 "output_text_tokens": 0,

600 "project_id": "project_id",

601 "service_tier": "service_tier",

602 "user_id": "user_id"

603 }

604 ],

605 "start_time": 0

606 }

607 ],

608 "has_more": true,

609 "next_page": "next_page",

610 "object": "page"

611}

612```

613 

614### Example

615 

616```http563```http

617curl "https://api.openai.com/v1/organization/usage/web_search_calls?start_time=1730419200&limit=1" \564curl "https://api.openai.com/v1/organization/usage/web_search_calls?start_time=1730419200&limit=1" \

618-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \565-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

24 24 

25### Example25### Example

26 26 

27```http

28curl https://api.openai.com/v1/organization/users/$USER_ID \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "id": "id",

38 "deleted": true,

39 "object": "organization.user.deleted"

40}

41```

42 

43### Example

44 

45```http27```http

46curl -X DELETE https://api.openai.com/v1/organization/users/user_abc \28curl -X DELETE https://api.openai.com/v1/organization/users/user_abc \

47 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \29 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

140 140 

141### Example141### Example

142 142 

143```http

144curl https://api.openai.com/v1/organization/users \

145 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

146```

147 

148#### 200 — Example

149 

150```json

151{

152 "data": [

153 {

154 "id": "id",

155 "added_at": 0,

156 "object": "organization.user",

157 "api_key_last_used_at": 0,

158 "created": 0,

159 "developer_persona": "developer_persona",

160 "email": "email",

161 "is_default": true,

162 "is_scale_tier_authorized_purchaser": true,

163 "is_scim_managed": true,

164 "is_service_account": true,

165 "name": "name",

166 "projects": {

167 "data": [

168 {

169 "id": "id",

170 "name": "name",

171 "role": "role"

172 }

173 ],

174 "object": "list"

175 },

176 "role": "role",

177 "technical_level": "technical_level",

178 "user": {

179 "id": "id",

180 "object": "user",

181 "banned": true,

182 "banned_at": 0,

183 "email": "email",

184 "enabled": true,

185 "name": "name",

186 "picture": "picture"

187 }

188 }

189 ],

190 "has_more": true,

191 "object": "list",

192 "first_id": "first_id",

193 "last_id": "last_id"

194}

195```

196 

197### Example

198 

199```http143```http

200curl https://api.openai.com/v1/organization/users?after=user_abc&limit=20 \144curl https://api.openai.com/v1/organization/users?after=user_abc&limit=20 \

201 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \145 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

124 124 

125### Example125### Example

126 126 

127```http

128curl https://api.openai.com/v1/organization/users/$USER_ID \

129 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

130```

131 

132#### 200 — Example

133 

134```json

135{

136 "id": "id",

137 "added_at": 0,

138 "object": "organization.user",

139 "api_key_last_used_at": 0,

140 "created": 0,

141 "developer_persona": "developer_persona",

142 "email": "email",

143 "is_default": true,

144 "is_scale_tier_authorized_purchaser": true,

145 "is_scim_managed": true,

146 "is_service_account": true,

147 "name": "name",

148 "projects": {

149 "data": [

150 {

151 "id": "id",

152 "name": "name",

153 "role": "role"

154 }

155 ],

156 "object": "list"

157 },

158 "role": "role",

159 "technical_level": "technical_level",

160 "user": {

161 "id": "id",

162 "object": "user",

163 "banned": true,

164 "banned_at": 0,

165 "email": "email",

166 "enabled": true,

167 "name": "name",

168 "picture": "picture"

169 }

170}

171```

172 

173### Example

174 

175```http127```http

176curl https://api.openai.com/v1/organization/users/user_abc \128curl https://api.openai.com/v1/organization/users/user_abc \

177 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \129 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

144 144 

145### Example145### Example

146 146 

147```http

148curl https://api.openai.com/v1/organization/users/$USER_ID \

149 -H 'Content-Type: application/json' \

150 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

151 -d '{}'

152```

153 

154#### 200 — Example

155 

156```json

157{

158 "id": "id",

159 "added_at": 0,

160 "object": "organization.user",

161 "api_key_last_used_at": 0,

162 "created": 0,

163 "developer_persona": "developer_persona",

164 "email": "email",

165 "is_default": true,

166 "is_scale_tier_authorized_purchaser": true,

167 "is_scim_managed": true,

168 "is_service_account": true,

169 "name": "name",

170 "projects": {

171 "data": [

172 {

173 "id": "id",

174 "name": "name",

175 "role": "role"

176 }

177 ],

178 "object": "list"

179 },

180 "role": "role",

181 "technical_level": "technical_level",

182 "user": {

183 "id": "id",

184 "object": "user",

185 "banned": true,

186 "banned_at": 0,

187 "email": "email",

188 "enabled": true,

189 "name": "name",

190 "picture": "picture"

191 }

192}

193```

194 

195### Example

196 

197```http147```http

198curl -X POST https://api.openai.com/v1/organization/users/user_abc \148curl -X POST https://api.openai.com/v1/organization/users/user_abc \

199 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \149 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

172 172 

173### Example173### Example

174 174 

175```http

176curl https://api.openai.com/v1/organization/users/$USER_ID/roles \

177 -H 'Content-Type: application/json' \

178 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

179 -d '{

180 "role_id": "role_id"

181 }'

182```

183 

184#### 200 — Example

185 

186```json

187{

188 "object": "user.role",

189 "role": {

190 "id": "id",

191 "description": "description",

192 "name": "name",

193 "object": "role",

194 "permissions": [

195 "string"

196 ],

197 "predefined_role": true,

198 "resource_type": "resource_type"

199 },

200 "user": {

201 "id": "id",

202 "added_at": 0,

203 "object": "organization.user",

204 "api_key_last_used_at": 0,

205 "created": 0,

206 "developer_persona": "developer_persona",

207 "email": "email",

208 "is_default": true,

209 "is_scale_tier_authorized_purchaser": true,

210 "is_scim_managed": true,

211 "is_service_account": true,

212 "name": "name",

213 "projects": {

214 "data": [

215 {

216 "id": "id",

217 "name": "name",

218 "role": "role"

219 }

220 ],

221 "object": "list"

222 },

223 "role": "role",

224 "technical_level": "technical_level",

225 "user": {

226 "id": "id",

227 "object": "user",

228 "banned": true,

229 "banned_at": 0,

230 "email": "email",

231 "enabled": true,

232 "name": "name",

233 "picture": "picture"

234 }

235 }

236}

237```

238 

239### Example

240 

241```http175```http

242curl -X POST https://api.openai.com/v1/organization/users/user_abc123/roles \176curl -X POST https://api.openai.com/v1/organization/users/user_abc123/roles \

243 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \177 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

28 28 

29### Example29### Example

30 30 

31```http

32curl https://api.openai.com/v1/organization/users/$USER_ID/roles/$ROLE_ID \

33 -X DELETE \

34 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

35```

36 

37#### 200 — Example

38 

39```json

40{

41 "deleted": true,

42 "object": "object"

43}

44```

45 

46### Example

47 

48```http31```http

49curl -X DELETE https://api.openai.com/v1/organization/users/user_abc123/roles/role_01J1F8ROLE01 \32curl -X DELETE https://api.openai.com/v1/organization/users/user_abc123/roles/role_01J1F8ROLE01 \

50 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \33 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

110 110 

111### Example111### Example

112 112 

113```http

114curl https://api.openai.com/v1/organization/users/$USER_ID/roles \

115 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

116```

117 

118#### 200 — Example

119 

120```json

121{

122 "data": [

123 {

124 "id": "id",

125 "assignment_sources": [

126 {

127 "principal_id": "principal_id",

128 "principal_type": "principal_type"

129 }

130 ],

131 "created_at": 0,

132 "created_by": "created_by",

133 "created_by_user_obj": {

134 "foo": "bar"

135 },

136 "description": "description",

137 "metadata": {

138 "foo": "bar"

139 },

140 "name": "name",

141 "permissions": [

142 "string"

143 ],

144 "predefined_role": true,

145 "resource_type": "resource_type",

146 "updated_at": 0

147 }

148 ],

149 "has_more": true,

150 "next": "next",

151 "object": "list"

152}

153```

154 

155### Example

156 

157```http113```http

158curl https://api.openai.com/v1/organization/users/user_abc123/roles \114curl https://api.openai.com/v1/organization/users/user_abc123/roles \

159 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \115 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

76 76 

77### Example77### Example

78 78 

79```http

80curl https://api.openai.com/v1/organization/users/$USER_ID/roles/$ROLE_ID \

81 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

82```

83 

84#### 200 — Example

85 

86```json

87{

88 "id": "id",

89 "assignment_sources": [

90 {

91 "principal_id": "principal_id",

92 "principal_type": "principal_type"

93 }

94 ],

95 "created_at": 0,

96 "created_by": "created_by",

97 "created_by_user_obj": {

98 "foo": "bar"

99 },

100 "description": "description",

101 "metadata": {

102 "foo": "bar"

103 },

104 "name": "name",

105 "permissions": [

106 "string"

107 ],

108 "predefined_role": true,

109 "resource_type": "resource_type",

110 "updated_at": 0

111}

112```

113 

114### Example

115 

116```http79```http

117curl https://api.openai.com/v1/organization/users/user_abc123/roles/role_01J1F8ROLE01 \80curl https://api.openai.com/v1/organization/users/user_abc123/roles/role_01J1F8ROLE01 \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \81 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

114 114 

115### Example115### Example

116 116 

117```http

118curl https://api.openai.com/v1/organization/workload_identity_providers \

119 -H 'Content-Type: application/json' \

120 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

121 -d '{

122 "audience": "x",

123 "issuer": "x",

124 "name": "x",

125 "type": "oidc"

126 }'

127```

128 

129#### 200 — Example

130 

131```json

132{

133 "id": "id",

134 "attribute_transformations": [

135 {

136 "attribute": "attribute",

137 "expression": "expression"

138 }

139 ],

140 "audience": "audience",

141 "created_at": 0,

142 "description": "description",

143 "enabled": true,

144 "issuer": "issuer",

145 "name": "name",

146 "object": "organization.workload_identity_provider",

147 "type": "oidc",

148 "updated_at": 0,

149 "verification": {

150 "discovery_url": "discovery_url",

151 "type": "discovery"

152 }

153}

154```

155 

156### Example

157 

158```http117```http

159curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers" \118curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers" \

160 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \119 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID \

31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

33```

34 

35#### 200 — Example

36 

37```json

38{

39 "id": "id",

40 "deleted": true,

41 "object": "organization.workload_identity_provider.deleted"

42}

43```

44 

45### Example

46 

47```http29```http

48curl -X DELETE "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \30curl -X DELETE "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \

49 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"31 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

88 88 

89### Example89### Example

90 90 

91```http

92curl https://api.openai.com/v1/organization/workload_identity_providers \

93 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

94```

95 

96#### 200 — Example

97 

98```json

99{

100 "data": [

101 {

102 "id": "id",

103 "attribute_transformations": [

104 {

105 "attribute": "attribute",

106 "expression": "expression"

107 }

108 ],

109 "audience": "audience",

110 "created_at": 0,

111 "description": "description",

112 "enabled": true,

113 "issuer": "issuer",

114 "name": "name",

115 "object": "organization.workload_identity_provider",

116 "type": "oidc",

117 "updated_at": 0,

118 "verification": {

119 "discovery_url": "discovery_url",

120 "type": "discovery"

121 }

122 }

123 ],

124 "first_id": "first_id",

125 "has_more": true,

126 "last_id": "last_id",

127 "object": "list"

128}

129```

130 

131### Example

132 

133```http91```http

134curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers?limit=20&order=asc" \92curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers?limit=20&order=asc" \

135 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"93 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

66 66 

67### Example67### Example

68 68 

69```http

70curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID \

71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

72```

73 

74#### 200 — Example

75 

76```json

77{

78 "id": "id",

79 "attribute_transformations": [

80 {

81 "attribute": "attribute",

82 "expression": "expression"

83 }

84 ],

85 "audience": "audience",

86 "created_at": 0,

87 "description": "description",

88 "enabled": true,

89 "issuer": "issuer",

90 "name": "name",

91 "object": "organization.workload_identity_provider",

92 "type": "oidc",

93 "updated_at": 0,

94 "verification": {

95 "discovery_url": "discovery_url",

96 "type": "discovery"

97 }

98}

99```

100 

101### Example

102 

103```http69```http

104curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \70curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \

105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"71 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

116 116 

117### Example117### Example

118 118 

119```http

120curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID \

121 -X POST \

122 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

123```

124 

125#### 200 — Example

126 

127```json

128{

129 "id": "id",

130 "attribute_transformations": [

131 {

132 "attribute": "attribute",

133 "expression": "expression"

134 }

135 ],

136 "audience": "audience",

137 "created_at": 0,

138 "description": "description",

139 "enabled": true,

140 "issuer": "issuer",

141 "name": "name",

142 "object": "organization.workload_identity_provider",

143 "type": "oidc",

144 "updated_at": 0,

145 "verification": {

146 "discovery_url": "discovery_url",

147 "type": "discovery"

148 }

149}

150```

151 

152### Example

153 

154```http119```http

155curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \120curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \

156 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \121 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

116 116 

117### Example117### Example

118 118 

119```http

120curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules \

121 -H 'Content-Type: application/json' \

122 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

123 -d '{

124 "attribute_matchers": {

125 "foo": "string"

126 },

127 "project_id": "x",

128 "service_account_id": "x"

129 }'

130```

131 

132#### 200 — Example

133 

134```json

135{

136 "id": "id",

137 "attribute_matchers": {

138 "foo": "string"

139 },

140 "created_at": 0,

141 "description": "description",

142 "enabled": true,

143 "name": "name",

144 "object": "organization.workload_identity_federation_rule",

145 "permissions": {

146 "type": "service_account_default"

147 },

148 "project_id": "project_id",

149 "service_account_id": "service_account_id",

150 "updated_at": 0,

151 "workload_identity_provider_id": "workload_identity_provider_id"

152}

153```

154 

155### Example

156 

157```http119```http

158curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules" \120curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules" \

159 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \121 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules/$WORKLOAD_IDENTITY_FEDERATION_RULE_ID \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "id": "id",

44 "deleted": true,

45 "object": "organization.workload_identity_federation_rule.deleted"

46}

47```

48 

49### Example

50 

51```http33```http

52curl -X DELETE "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \34curl -X DELETE "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \

53 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"35 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

100 100 

101### Example101### Example

102 102 

103```http

104curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules \

105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

106```

107 

108#### 200 — Example

109 

110```json

111{

112 "data": [

113 {

114 "id": "id",

115 "attribute_matchers": {

116 "foo": "string"

117 },

118 "created_at": 0,

119 "description": "description",

120 "enabled": true,

121 "name": "name",

122 "object": "organization.workload_identity_federation_rule",

123 "permissions": {

124 "type": "service_account_default"

125 },

126 "project_id": "project_id",

127 "service_account_id": "service_account_id",

128 "updated_at": 0,

129 "workload_identity_provider_id": "workload_identity_provider_id"

130 }

131 ],

132 "first_id": "first_id",

133 "has_more": true,

134 "last_id": "last_id",

135 "object": "list"

136}

137```

138 

139### Example

140 

141```http103```http

142curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules?limit=20&order=asc" \104curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules?limit=20&order=asc" \

143 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"105 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

72 72 

73### Example73### Example

74 74 

75```http

76curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules/$WORKLOAD_IDENTITY_FEDERATION_RULE_ID \

77 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "id": "id",

85 "attribute_matchers": {

86 "foo": "string"

87 },

88 "created_at": 0,

89 "description": "description",

90 "enabled": true,

91 "name": "name",

92 "object": "organization.workload_identity_federation_rule",

93 "permissions": {

94 "type": "service_account_default"

95 },

96 "project_id": "project_id",

97 "service_account_id": "service_account_id",

98 "updated_at": 0,

99 "workload_identity_provider_id": "workload_identity_provider_id"

100}

101```

102 

103### Example

104 

105```http75```http

106curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \76curl -X GET "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \

107 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"77 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

Details

112 112 

113### Example113### Example

114 114 

115```http

116curl https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID/federation_rules/$WORKLOAD_IDENTITY_FEDERATION_RULE_ID \

117 -X POST \

118 -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

119```

120 

121#### 200 — Example

122 

123```json

124{

125 "id": "id",

126 "attribute_matchers": {

127 "foo": "string"

128 },

129 "created_at": 0,

130 "description": "description",

131 "enabled": true,

132 "name": "name",

133 "object": "organization.workload_identity_federation_rule",

134 "permissions": {

135 "type": "service_account_default"

136 },

137 "project_id": "project_id",

138 "service_account_id": "service_account_id",

139 "updated_at": 0,

140 "workload_identity_provider_id": "workload_identity_provider_id"

141}

142```

143 

144### Example

145 

146```http115```http

147curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \116curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example/federation_rules/wifr_example" \

148 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \117 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \

Details

129 129 

130### Example130### Example

131 131 

132```http

133curl https://api.openai.com/v1/audio/speech \

134 -H 'Content-Type: application/json' \

135 -H "Authorization: Bearer $OPENAI_API_KEY" \

136 -d '{

137 "input": "input",

138 "model": "tts-1",

139 "voice": "ash"

140 }'

141```

142 

143### Example

144 

145```http132```http

146curl https://api.openai.com/v1/audio/speech \133curl https://api.openai.com/v1/audio/speech \

147 -H "Authorization: Bearer $OPENAI_API_KEY" \134 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

460 460 

461### Example461### Example

462 462 

463```http

464curl https://api.openai.com/v1/audio/transcriptions \

465 -H 'Content-Type: multipart/form-data' \

466 -H "Authorization: Bearer $OPENAI_API_KEY" \

467 -F 'file=@/path/to/file' \

468 -F model=gpt-4o-transcribe

469```

470 

471#### 200 — Example

472 

473```json

474{

475 "text": "text",

476 "languages": [

477 {

478 "code": "code"

479 }

480 ],

481 "logprobs": [

482 {

483 "token": "token",

484 "bytes": [

485 0

486 ],

487 "logprob": 0

488 }

489 ],

490 "usage": {

491 "input_tokens": 0,

492 "output_tokens": 0,

493 "total_tokens": 0,

494 "type": "tokens",

495 "input_token_details": {

496 "audio_tokens": 0,

497 "text_tokens": 0

498 }

499 }

500}

501```

502 

503### Example

504 

505```http463```http

506curl https://api.openai.com/v1/audio/transcriptions \464curl https://api.openai.com/v1/audio/transcriptions \

507 -H "Authorization: Bearer $OPENAI_API_KEY" \465 -H "Authorization: Bearer $OPENAI_API_KEY" \

508 -H "Content-Type: multipart/form-data" \466 -H "Content-Type: multipart/form-data" \

509 -F file="@/path/to/file/audio.mp3" \467 -F file="@/path/to/file/audio.mp3" \

510 -F model="gpt-4o-transcribe"468 -F model="gpt-transcribe"

511```469```

512 470 

513#### Response example471#### Response example


704 -H "Authorization: Bearer $OPENAI_API_KEY" \662 -H "Authorization: Bearer $OPENAI_API_KEY" \

705 -H "Content-Type: multipart/form-data" \663 -H "Content-Type: multipart/form-data" \

706 -F file="@/path/to/file/audio.mp3" \664 -F file="@/path/to/file/audio.mp3" \

707 -F model="gpt-4o-mini-transcribe" \665 -F model="gpt-transcribe" \

708 -F stream=true666 -F stream=true

709```667```

710 668 

711#### Response example669#### Response example

712 670 

713```json671```json

714data: {"type":"transcript.text.delta","delta":"I","logprobs":[{"token":"I","logprob":-0.00007588794,"bytes":[73]}]}672data: {"type":"transcript.text.delta","delta":"I"}

715 673 

716data: {"type":"transcript.text.delta","delta":" see","logprobs":[{"token":" see","logprob":-3.1281633e-7,"bytes":[32,115,101,101]}]}674data: {"type":"transcript.text.delta","delta":" see"}

717 675 

718data: {"type":"transcript.text.delta","delta":" skies","logprobs":[{"token":" skies","logprob":-2.3392786e-6,"bytes":[32,115,107,105,101,115]}]}676data: {"type":"transcript.text.delta","delta":" skies"}

719 677 

720data: {"type":"transcript.text.delta","delta":" of","logprobs":[{"token":" of","logprob":-3.1281633e-7,"bytes":[32,111,102]}]}678data: {"type":"transcript.text.delta","delta":" of"}

721 679 

722data: {"type":"transcript.text.delta","delta":" blue","logprobs":[{"token":" blue","logprob":-1.0280384e-6,"bytes":[32,98,108,117,101]}]}680data: {"type":"transcript.text.delta","delta":" blue"}

723 681 

724data: {"type":"transcript.text.delta","delta":" and","logprobs":[{"token":" and","logprob":-0.0005108566,"bytes":[32,97,110,100]}]}682data: {"type":"transcript.text.delta","delta":" and"}

725 683 

726data: {"type":"transcript.text.delta","delta":" clouds","logprobs":[{"token":" clouds","logprob":-1.9361265e-7,"bytes":[32,99,108,111,117,100,115]}]}684data: {"type":"transcript.text.delta","delta":" clouds"}

727 685 

728data: {"type":"transcript.text.delta","delta":" of","logprobs":[{"token":" of","logprob":-1.9361265e-7,"bytes":[32,111,102]}]}686data: {"type":"transcript.text.delta","delta":" of"}

729 687 

730data: {"type":"transcript.text.delta","delta":" white","logprobs":[{"token":" white","logprob":-7.89631e-7,"bytes":[32,119,104,105,116,101]}]}688data: {"type":"transcript.text.delta","delta":" white"}

731 689 

732data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.0014890312,"bytes":[44]}]}690data: {"type":"transcript.text.delta","delta":","}

733 691 

734data: {"type":"transcript.text.delta","delta":" the","logprobs":[{"token":" the","logprob":-0.0110956915,"bytes":[32,116,104,101]}]}692data: {"type":"transcript.text.delta","delta":" the"}

735 693 

736data: {"type":"transcript.text.delta","delta":" bright","logprobs":[{"token":" bright","logprob":0.0,"bytes":[32,98,114,105,103,104,116]}]}694data: {"type":"transcript.text.delta","delta":" bright"}

737 695 

738data: {"type":"transcript.text.delta","delta":" blessed","logprobs":[{"token":" blessed","logprob":-0.000045848617,"bytes":[32,98,108,101,115,115,101,100]}]}696data: {"type":"transcript.text.delta","delta":" blessed"}

739 697 

740data: {"type":"transcript.text.delta","delta":" days","logprobs":[{"token":" days","logprob":-0.000010802739,"bytes":[32,100,97,121,115]}]}698data: {"type":"transcript.text.delta","delta":" days"}

741 699 

742data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.00001700133,"bytes":[44]}]}700data: {"type":"transcript.text.delta","delta":","}

743 701 

744data: {"type":"transcript.text.delta","delta":" the","logprobs":[{"token":" the","logprob":-0.0000118755715,"bytes":[32,116,104,101]}]}702data: {"type":"transcript.text.delta","delta":" the"}

745 703 

746data: {"type":"transcript.text.delta","delta":" dark","logprobs":[{"token":" dark","logprob":-5.5122365e-7,"bytes":[32,100,97,114,107]}]}704data: {"type":"transcript.text.delta","delta":" dark"}

747 705 

748data: {"type":"transcript.text.delta","delta":" sacred","logprobs":[{"token":" sacred","logprob":-5.4385737e-6,"bytes":[32,115,97,99,114,101,100]}]}706data: {"type":"transcript.text.delta","delta":" sacred"}

749 707 

750data: {"type":"transcript.text.delta","delta":" nights","logprobs":[{"token":" nights","logprob":-4.00813e-6,"bytes":[32,110,105,103,104,116,115]}]}708data: {"type":"transcript.text.delta","delta":" nights"}

751 709 

752data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.0036910512,"bytes":[44]}]}710data: {"type":"transcript.text.delta","delta":","}

753 711 

754data: {"type":"transcript.text.delta","delta":" and","logprobs":[{"token":" and","logprob":-0.0031903093,"bytes":[32,97,110,100]}]}712data: {"type":"transcript.text.delta","delta":" and"}

755 713 

756data: {"type":"transcript.text.delta","delta":" I","logprobs":[{"token":" I","logprob":-1.504853e-6,"bytes":[32,73]}]}714data: {"type":"transcript.text.delta","delta":" I"}

757 715 

758data: {"type":"transcript.text.delta","delta":" think","logprobs":[{"token":" think","logprob":-4.3202e-7,"bytes":[32,116,104,105,110,107]}]}716data: {"type":"transcript.text.delta","delta":" think"}

759 717 

760data: {"type":"transcript.text.delta","delta":" to","logprobs":[{"token":" to","logprob":-1.9361265e-7,"bytes":[32,116,111]}]}718data: {"type":"transcript.text.delta","delta":" to"}

761 719 

762data: {"type":"transcript.text.delta","delta":" myself","logprobs":[{"token":" myself","logprob":-1.7432603e-6,"bytes":[32,109,121,115,101,108,102]}]}720data: {"type":"transcript.text.delta","delta":" myself"}

763 721 

764data: {"type":"transcript.text.delta","delta":",","logprobs":[{"token":",","logprob":-0.29254505,"bytes":[44]}]}722data: {"type":"transcript.text.delta","delta":","}

765 723 

766data: {"type":"transcript.text.delta","delta":" what","logprobs":[{"token":" what","logprob":-0.016815351,"bytes":[32,119,104,97,116]}]}724data: {"type":"transcript.text.delta","delta":" what"}

767 725 

768data: {"type":"transcript.text.delta","delta":" a","logprobs":[{"token":" a","logprob":-3.1281633e-7,"bytes":[32,97]}]}726data: {"type":"transcript.text.delta","delta":" a"}

769 727 

770data: {"type":"transcript.text.delta","delta":" wonderful","logprobs":[{"token":" wonderful","logprob":-2.1008714e-6,"bytes":[32,119,111,110,100,101,114,102,117,108]}]}728data: {"type":"transcript.text.delta","delta":" wonderful"}

771 729 

772data: {"type":"transcript.text.delta","delta":" world","logprobs":[{"token":" world","logprob":-8.180258e-6,"bytes":[32,119,111,114,108,100]}]}730data: {"type":"transcript.text.delta","delta":" world"}

773 731 

774data: {"type":"transcript.text.delta","delta":".","logprobs":[{"token":".","logprob":-0.014231676,"bytes":[46]}]}732data: {"type":"transcript.text.delta","delta":"."}

775 733 

776data: {"type":"transcript.text.done","text":"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.","logprobs":[{"token":"I","logprob":-0.00007588794,"bytes":[73]},{"token":" see","logprob":-3.1281633e-7,"bytes":[32,115,101,101]},{"token":" skies","logprob":-2.3392786e-6,"bytes":[32,115,107,105,101,115]},{"token":" of","logprob":-3.1281633e-7,"bytes":[32,111,102]},{"token":" blue","logprob":-1.0280384e-6,"bytes":[32,98,108,117,101]},{"token":" and","logprob":-0.0005108566,"bytes":[32,97,110,100]},{"token":" clouds","logprob":-1.9361265e-7,"bytes":[32,99,108,111,117,100,115]},{"token":" of","logprob":-1.9361265e-7,"bytes":[32,111,102]},{"token":" white","logprob":-7.89631e-7,"bytes":[32,119,104,105,116,101]},{"token":",","logprob":-0.0014890312,"bytes":[44]},{"token":" the","logprob":-0.0110956915,"bytes":[32,116,104,101]},{"token":" bright","logprob":0.0,"bytes":[32,98,114,105,103,104,116]},{"token":" blessed","logprob":-0.000045848617,"bytes":[32,98,108,101,115,115,101,100]},{"token":" days","logprob":-0.000010802739,"bytes":[32,100,97,121,115]},{"token":",","logprob":-0.00001700133,"bytes":[44]},{"token":" the","logprob":-0.0000118755715,"bytes":[32,116,104,101]},{"token":" dark","logprob":-5.5122365e-7,"bytes":[32,100,97,114,107]},{"token":" sacred","logprob":-5.4385737e-6,"bytes":[32,115,97,99,114,101,100]},{"token":" nights","logprob":-4.00813e-6,"bytes":[32,110,105,103,104,116,115]},{"token":",","logprob":-0.0036910512,"bytes":[44]},{"token":" and","logprob":-0.0031903093,"bytes":[32,97,110,100]},{"token":" I","logprob":-1.504853e-6,"bytes":[32,73]},{"token":" think","logprob":-4.3202e-7,"bytes":[32,116,104,105,110,107]},{"token":" to","logprob":-1.9361265e-7,"bytes":[32,116,111]},{"token":" myself","logprob":-1.7432603e-6,"bytes":[32,109,121,115,101,108,102]},{"token":",","logprob":-0.29254505,"bytes":[44]},{"token":" what","logprob":-0.016815351,"bytes":[32,119,104,97,116]},{"token":" a","logprob":-3.1281633e-7,"bytes":[32,97]},{"token":" wonderful","logprob":-2.1008714e-6,"bytes":[32,119,111,110,100,101,114,102,117,108]},{"token":" world","logprob":-8.180258e-6,"bytes":[32,119,111,114,108,100]},{"token":".","logprob":-0.014231676,"bytes":[46]}],"usage":{"input_tokens":14,"input_token_details":{"text_tokens":0,"audio_tokens":14},"output_tokens":45,"total_tokens":59}}734data: {"type":"transcript.text.done","text":"I see skies of blue and clouds of white, the bright blessed days, the dark sacred nights, and I think to myself, what a wonderful world.","languages":[{"code":"en"}],"usage":{"type":"tokens","input_tokens":14,"input_token_details":{"text_tokens":0,"audio_tokens":14},"output_tokens":45,"total_tokens":59}}

777```735```

778 736 

779### Word timestamps737### Word timestamps

Details

142 142 

143### Example143### Example

144 144 

145```http

146curl https://api.openai.com/v1/audio/translations \

147 -H 'Content-Type: multipart/form-data' \

148 -H "Authorization: Bearer $OPENAI_API_KEY" \

149 -F 'file=@/path/to/file' \

150 -F model=whisper-1

151```

152 

153#### 200 — Example

154 

155```json

156{

157 "text": "text"

158}

159```

160 

161### Example

162 

163```http145```http

164curl https://api.openai.com/v1/audio/translations \146curl https://api.openai.com/v1/audio/translations \

165 -H "Authorization: Bearer $OPENAI_API_KEY" \147 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

59 59 

60```http60```http

61curl https://api.openai.com/v1/audio/voice_consents \61curl https://api.openai.com/v1/audio/voice_consents \

62 -H 'Content-Type: multipart/form-data' \62 -X POST \

63 -H "Authorization: Bearer $OPENAI_API_KEY" \63 -H "Authorization: Bearer $OPENAI_API_KEY" \

64 -F language=language \64 -F "name=John Doe" \

65 -F name=name \65 -F "language=en-US" \

66 -F 'recording=@/path/to/recording'66 -F "recording=@$HOME/consent_recording.wav;type=audio/x-wav"

67```67```

68 68 

69#### 200 — Example69#### 200 — Example


77 "object": "audio.voice_consent"77 "object": "audio.voice_consent"

78}78}

79```79```

80 

81### Example

82 

83```http

84curl https://api.openai.com/v1/audio/voice_consents \

85 -X POST \

86 -H "Authorization: Bearer $OPENAI_API_KEY" \

87 -F "name=John Doe" \

88 -F "language=en-US" \

89 -F "recording=@$HOME/consent_recording.wav;type=audio/x-wav"

90```

Details

29### Example29### Example

30 30 

31```http31```http

32curl https://api.openai.com/v1/audio/voice_consents/$CONSENT_ID \32curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \

33 -X DELETE \33 -X DELETE \

34 -H "Authorization: Bearer $OPENAI_API_KEY"34 -H "Authorization: Bearer $OPENAI_API_KEY"

35```35```


43 "object": "audio.voice_consent"43 "object": "audio.voice_consent"

44}44}

45```45```

46 

47### Example

48 

49```http

50curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \

51 -X DELETE \

52 -H "Authorization: Bearer $OPENAI_API_KEY"

53```

Details

57### Example57### Example

58 58 

59```http59```http

60curl https://api.openai.com/v1/audio/voice_consents \60curl https://api.openai.com/v1/audio/voice_consents?limit=20 \

61 -H "Authorization: Bearer $OPENAI_API_KEY"61 -H "Authorization: Bearer $OPENAI_API_KEY"

62```62```

63 63 


80 "last_id": "last_id"80 "last_id": "last_id"

81}81}

82```82```

83 

84### Example

85 

86```http

87curl https://api.openai.com/v1/audio/voice_consents?limit=20 \

88 -H "Authorization: Bearer $OPENAI_API_KEY"

89```

Details

45### Example45### Example

46 46 

47```http47```http

48curl https://api.openai.com/v1/audio/voice_consents/$CONSENT_ID \48curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \

49 -H "Authorization: Bearer $OPENAI_API_KEY"49 -H "Authorization: Bearer $OPENAI_API_KEY"

50```50```

51 51 


60 "object": "audio.voice_consent"60 "object": "audio.voice_consent"

61}61}

62```62```

63 

64### Example

65 

66```http

67curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \

68 -H "Authorization: Bearer $OPENAI_API_KEY"

69```

Details

53### Example53### Example

54 54 

55```http55```http

56curl https://api.openai.com/v1/audio/voice_consents/$CONSENT_ID \56curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \

57 -H 'Content-Type: application/json' \57 -X POST \

58 -H "Authorization: Bearer $OPENAI_API_KEY" \58 -H "Authorization: Bearer $OPENAI_API_KEY" \

59 -H "Content-Type: application/json" \

59 -d '{60 -d '{

60 "name": "name"61 "name": "John Doe"

61 }'62 }'

62```63```

63 64 


72 "object": "audio.voice_consent"73 "object": "audio.voice_consent"

73}74}

74```75```

75 

76### Example

77 

78```http

79curl https://api.openai.com/v1/audio/voice_consents/cons_1234 \

80 -X POST \

81 -H "Authorization: Bearer $OPENAI_API_KEY" \

82 -H "Content-Type: application/json" \

83 -d '{

84 "name": "John Doe"

85 }'

86```

Details

94 94 

95```http95```http

96curl https://api.openai.com/v1/audio/voices \96curl https://api.openai.com/v1/audio/voices \

97 -H 'Content-Type: application/json' \97 -X POST \

98 -H "Authorization: Bearer $OPENAI_API_KEY" \98 -H "Authorization: Bearer $OPENAI_API_KEY" \

99 -H "Content-Type: application/json" \

99 -d '{100 -d '{

100 "name": "x",101 "type": "prompt",

101 "prompt": "x",102 "name": "Warm narrator",

102 "type": "prompt"103 "prompt": "A warm, calm narrator with a clear, measured delivery.",

104 "model": "auto"

103 }'105 }'

104```106```

105 107 


115 "prompt": "prompt"117 "prompt": "prompt"

116}118}

117```119```

118 

119### Example

120 

121```http

122curl https://api.openai.com/v1/audio/voices \

123 -X POST \

124 -H "Authorization: Bearer $OPENAI_API_KEY" \

125 -H "Content-Type: application/json" \

126 -d '{

127 "type": "prompt",

128 "name": "Warm narrator",

129 "prompt": "A warm, calm narrator with a clear, measured delivery.",

130 "model": "auto"

131 }'

132```

Details

36 36 

37### Example37### Example

38 38 

39```http

40curl https://api.openai.com/v1/audio/voices/$VOICE_ID \

41 -X DELETE \

42 -H "Authorization: Bearer $OPENAI_API_KEY"

43```

44 

45#### 200 — Example

46 

47```json

48{

49 "id": "voice_1234",

50 "deleted": true,

51 "object": "audio.voice.deleted"

52}

53```

54 

55### Example

56 

57```http39```http

58curl https://api.openai.com/v1/audio/voices/voice_1234 \40curl https://api.openai.com/v1/audio/voices/voice_1234 \

59 -X DELETE \41 -X DELETE \

Details

149 149 

150 - `model: optional string`150 - `model: optional string`

151 151 

152 Model ID used to process the batch, like `gpt-6-astra`. OpenAI152 Model ID used to process the batch, like `gpt-6.2-astra`. OpenAI

153 offers a wide range of models with different capabilities, performance153 offers a wide range of models with different capabilities, performance

154 characteristics, and price points. Refer to the [model154 characteristics, and price points. Refer to the [model

155 guide](/api/docs/models) to browse and compare available models.155 guide](/api/docs/models) to browse and compare available models.


211 211 

212### Example212### Example

213 213 

214```http

215curl https://api.openai.com/v1/batches/$BATCH_ID/cancel \

216 -X POST \

217 -H "Authorization: Bearer $OPENAI_API_KEY"

218```

219 

220#### 200 — Example

221 

222```json

223{

224 "id": "id",

225 "completion_window": "completion_window",

226 "created_at": 0,

227 "endpoint": "endpoint",

228 "input_file_id": "input_file_id",

229 "object": "batch",

230 "status": "validating",

231 "cancelled_at": 0,

232 "cancelling_at": 0,

233 "completed_at": 0,

234 "error_file_id": "error_file_id",

235 "errors": {

236 "data": [

237 {

238 "code": "code",

239 "line": 0,

240 "message": "message",

241 "param": "param"

242 }

243 ],

244 "object": "object"

245 },

246 "expired_at": 0,

247 "expires_at": 0,

248 "failed_at": 0,

249 "finalizing_at": 0,

250 "in_progress_at": 0,

251 "metadata": {

252 "foo": "string"

253 },

254 "model": "model",

255 "output_file_id": "output_file_id",

256 "request_counts": {

257 "completed": 0,

258 "failed": 0,

259 "total": 0

260 },

261 "usage": {

262 "input_tokens": 0,

263 "input_tokens_details": {

264 "cached_tokens": 0

265 },

266 "output_tokens": 0,

267 "output_tokens_details": {

268 "reasoning_tokens": 0

269 },

270 "total_tokens": 0

271 }

272}

273```

274 

275### Example

276 

277```http214```http

278curl https://api.openai.com/v1/batches/batch_abc123/cancel \215curl https://api.openai.com/v1/batches/batch_abc123/cancel \

279 -H "Authorization: Bearer $OPENAI_API_KEY" \216 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

204 204 

205 - `model: optional string`205 - `model: optional string`

206 206 

207 Model ID used to process the batch, like `gpt-6-astra`. OpenAI207 Model ID used to process the batch, like `gpt-6.2-astra`. OpenAI

208 offers a wide range of models with different capabilities, performance208 offers a wide range of models with different capabilities, performance

209 characteristics, and price points. Refer to the [model209 characteristics, and price points. Refer to the [model

210 guide](/api/docs/models) to browse and compare available models.210 guide](/api/docs/models) to browse and compare available models.


266 266 

267### Example267### Example

268 268 

269```http

270curl https://api.openai.com/v1/batches \

271 -H 'Content-Type: application/json' \

272 -H "Authorization: Bearer $OPENAI_API_KEY" \

273 -d '{

274 "completion_window": "24h",

275 "endpoint": "/v1/responses",

276 "input_file_id": "input_file_id"

277 }'

278```

279 

280#### 200 — Example

281 

282```json

283{

284 "id": "id",

285 "completion_window": "completion_window",

286 "created_at": 0,

287 "endpoint": "endpoint",

288 "input_file_id": "input_file_id",

289 "object": "batch",

290 "status": "validating",

291 "cancelled_at": 0,

292 "cancelling_at": 0,

293 "completed_at": 0,

294 "error_file_id": "error_file_id",

295 "errors": {

296 "data": [

297 {

298 "code": "code",

299 "line": 0,

300 "message": "message",

301 "param": "param"

302 }

303 ],

304 "object": "object"

305 },

306 "expired_at": 0,

307 "expires_at": 0,

308 "failed_at": 0,

309 "finalizing_at": 0,

310 "in_progress_at": 0,

311 "metadata": {

312 "foo": "string"

313 },

314 "model": "model",

315 "output_file_id": "output_file_id",

316 "request_counts": {

317 "completed": 0,

318 "failed": 0,

319 "total": 0

320 },

321 "usage": {

322 "input_tokens": 0,

323 "input_tokens_details": {

324 "cached_tokens": 0

325 },

326 "output_tokens": 0,

327 "output_tokens_details": {

328 "reasoning_tokens": 0

329 },

330 "total_tokens": 0

331 }

332}

333```

334 

335### Example

336 

337```http269```http

338curl https://api.openai.com/v1/batches \270curl https://api.openai.com/v1/batches \

339 -H "Authorization: Bearer $OPENAI_API_KEY" \271 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

153 153 

154 - `model: optional string`154 - `model: optional string`

155 155 

156 Model ID used to process the batch, like `gpt-6-astra`. OpenAI156 Model ID used to process the batch, like `gpt-6.2-astra`. OpenAI

157 offers a wide range of models with different capabilities, performance157 offers a wide range of models with different capabilities, performance

158 characteristics, and price points. Refer to the [model158 characteristics, and price points. Refer to the [model

159 guide](/api/docs/models) to browse and compare available models.159 guide](/api/docs/models) to browse and compare available models.


225 225 

226### Example226### Example

227 227 

228```http

229curl https://api.openai.com/v1/batches \

230 -H "Authorization: Bearer $OPENAI_API_KEY"

231```

232 

233#### 200 — Example

234 

235```json

236{

237 "data": [

238 {

239 "id": "id",

240 "completion_window": "completion_window",

241 "created_at": 0,

242 "endpoint": "endpoint",

243 "input_file_id": "input_file_id",

244 "object": "batch",

245 "status": "validating",

246 "cancelled_at": 0,

247 "cancelling_at": 0,

248 "completed_at": 0,

249 "error_file_id": "error_file_id",

250 "errors": {

251 "data": [

252 {

253 "code": "code",

254 "line": 0,

255 "message": "message",

256 "param": "param"

257 }

258 ],

259 "object": "object"

260 },

261 "expired_at": 0,

262 "expires_at": 0,

263 "failed_at": 0,

264 "finalizing_at": 0,

265 "in_progress_at": 0,

266 "metadata": {

267 "foo": "string"

268 },

269 "model": "model",

270 "output_file_id": "output_file_id",

271 "request_counts": {

272 "completed": 0,

273 "failed": 0,

274 "total": 0

275 },

276 "usage": {

277 "input_tokens": 0,

278 "input_tokens_details": {

279 "cached_tokens": 0

280 },

281 "output_tokens": 0,

282 "output_tokens_details": {

283 "reasoning_tokens": 0

284 },

285 "total_tokens": 0

286 }

287 }

288 ],

289 "has_more": true,

290 "object": "list",

291 "first_id": "batch_abc123",

292 "last_id": "batch_abc456"

293}

294```

295 

296### Example

297 

298```http228```http

299curl https://api.openai.com/v1/batches?limit=2 \229curl https://api.openai.com/v1/batches?limit=2 \

300 -H "Authorization: Bearer $OPENAI_API_KEY" \230 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

149 149 

150 - `model: optional string`150 - `model: optional string`

151 151 

152 Model ID used to process the batch, like `gpt-6-astra`. OpenAI152 Model ID used to process the batch, like `gpt-6.2-astra`. OpenAI

153 offers a wide range of models with different capabilities, performance153 offers a wide range of models with different capabilities, performance

154 characteristics, and price points. Refer to the [model154 characteristics, and price points. Refer to the [model

155 guide](/api/docs/models) to browse and compare available models.155 guide](/api/docs/models) to browse and compare available models.


211 211 

212### Example212### Example

213 213 

214```http

215curl https://api.openai.com/v1/batches/$BATCH_ID \

216 -H "Authorization: Bearer $OPENAI_API_KEY"

217```

218 

219#### 200 — Example

220 

221```json

222{

223 "id": "id",

224 "completion_window": "completion_window",

225 "created_at": 0,

226 "endpoint": "endpoint",

227 "input_file_id": "input_file_id",

228 "object": "batch",

229 "status": "validating",

230 "cancelled_at": 0,

231 "cancelling_at": 0,

232 "completed_at": 0,

233 "error_file_id": "error_file_id",

234 "errors": {

235 "data": [

236 {

237 "code": "code",

238 "line": 0,

239 "message": "message",

240 "param": "param"

241 }

242 ],

243 "object": "object"

244 },

245 "expired_at": 0,

246 "expires_at": 0,

247 "failed_at": 0,

248 "finalizing_at": 0,

249 "in_progress_at": 0,

250 "metadata": {

251 "foo": "string"

252 },

253 "model": "model",

254 "output_file_id": "output_file_id",

255 "request_counts": {

256 "completed": 0,

257 "failed": 0,

258 "total": 0

259 },

260 "usage": {

261 "input_tokens": 0,

262 "input_tokens_details": {

263 "cached_tokens": 0

264 },

265 "output_tokens": 0,

266 "output_tokens_details": {

267 "reasoning_tokens": 0

268 },

269 "total_tokens": 0

270 }

271}

272```

273 

274### Example

275 

276```http214```http

277curl https://api.openai.com/v1/batches/batch_abc123 \215curl https://api.openai.com/v1/batches/batch_abc123 \

278 -H "Authorization: Bearer $OPENAI_API_KEY" \216 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

883### Example883### Example

884 884 

885```http885```http

886curl https://api.openai.com/v1/agents/$AGENT_ID \886# 1. Omit reasoning: keep its current settings while renaming the agent.

887 -X POST \887curl "https://api.openai.com/v1/agents/$AGENT_ID" \

888 -H 'OpenAI-Beta: agents=v1' \888 -H "Authorization: Bearer $OPENAI_API_KEY" \

889 -H "Authorization: Bearer $OPENAI_API_KEY"889 -H "Content-Type: application/json" \

890 -H "OpenAI-Beta: agents=v1" \

891 -d '{"name": "Renamed"}'

892 

893# 2. Send null: reset reasoning to the model's defaults.

894curl "https://api.openai.com/v1/agents/$AGENT_ID" \

895 -H "Authorization: Bearer $OPENAI_API_KEY" \

896 -H "Content-Type: application/json" \

897 -H "OpenAI-Beta: agents=v1" \

898 -d '{"reasoning": null}'

899 

900# 3. Send an object: replace the entire reasoning configuration, without merging.

901# The agent's model must support the "low" reasoning effort.

902curl "https://api.openai.com/v1/agents/$AGENT_ID" \

903 -H "Authorization: Bearer $OPENAI_API_KEY" \

904 -H "Content-Type: application/json" \

905 -H "OpenAI-Beta: agents=v1" \

906 -d '{"reasoning": {"effort": "low"}}'

890```907```

891 908 

892#### 200 — Example909#### 200 — Example


938 }955 }

939}956}

940```957```

941 

942### Example

943 

944```http

945# 1. Omit reasoning: keep its current settings while renaming the agent.

946curl "https://api.openai.com/v1/agents/$AGENT_ID" \

947 -H "Authorization: Bearer $OPENAI_API_KEY" \

948 -H "Content-Type: application/json" \

949 -H "OpenAI-Beta: agents=v1" \

950 -d '{"name": "Renamed"}'

951 

952# 2. Send null: reset reasoning to the model's defaults.

953curl "https://api.openai.com/v1/agents/$AGENT_ID" \

954 -H "Authorization: Bearer $OPENAI_API_KEY" \

955 -H "Content-Type: application/json" \

956 -H "OpenAI-Beta: agents=v1" \

957 -d '{"reasoning": null}'

958 

959# 3. Send an object: replace the entire reasoning configuration, without merging.

960# The agent's model must support the "low" reasoning effort.

961curl "https://api.openai.com/v1/agents/$AGENT_ID" \

962 -H "Authorization: Bearer $OPENAI_API_KEY" \

963 -H "Content-Type: application/json" \

964 -H "OpenAI-Beta: agents=v1" \

965 -d '{"reasoning": {"effort": "low"}}'

966```

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/assistants/$ASSISTANT_ID \

31 -X DELETE \

32 -H 'OpenAI-Beta: assistants=v2' \

33 -H "Authorization: Bearer $OPENAI_API_KEY"

34```

35 

36#### 200 — Example

37 

38```json

39{

40 "id": "id",

41 "deleted": true,

42 "object": "assistant.deleted"

43}

44```

45 

46### Example

47 

48```http29```http

49curl https://api.openai.com/v1/assistants/asst_abc123 \30curl https://api.openai.com/v1/assistants/asst_abc123 \

50 -H "Content-Type: application/json" \31 -H "Content-Type: application/json" \

Details

282 282 

283### Example283### Example

284 284 

285```http

286curl https://api.openai.com/v1/assistants \

287 -H 'OpenAI-Beta: assistants=v2' \

288 -H "Authorization: Bearer $OPENAI_API_KEY"

289```

290 

291#### 200 — Example

292 

293```json

294{

295 "data": [

296 {

297 "id": "id",

298 "created_at": 0,

299 "description": "description",

300 "instructions": "instructions",

301 "metadata": {

302 "foo": "string"

303 },

304 "model": "model",

305 "name": "name",

306 "object": "assistant",

307 "tools": [

308 {

309 "type": "code_interpreter"

310 }

311 ],

312 "response_format": "auto",

313 "temperature": 1,

314 "tool_resources": {

315 "code_interpreter": {

316 "file_ids": [

317 "string"

318 ]

319 },

320 "file_search": {

321 "vector_store_ids": [

322 "string"

323 ]

324 }

325 },

326 "top_p": 1

327 }

328 ],

329 "first_id": "asst_abc123",

330 "has_more": false,

331 "last_id": "asst_abc456",

332 "object": "list"

333}

334```

335 

336### Example

337 

338```http285```http

339curl "https://api.openai.com/v1/assistants?order=desc&limit=20" \286curl "https://api.openai.com/v1/assistants?order=desc&limit=20" \

340 -H "Content-Type: application/json" \287 -H "Content-Type: application/json" \

Details

260 260 

261### Example261### Example

262 262 

263```http

264curl https://api.openai.com/v1/assistants/$ASSISTANT_ID \

265 -H 'OpenAI-Beta: assistants=v2' \

266 -H "Authorization: Bearer $OPENAI_API_KEY"

267```

268 

269#### 200 — Example

270 

271```json

272{

273 "id": "id",

274 "created_at": 0,

275 "description": "description",

276 "instructions": "instructions",

277 "metadata": {

278 "foo": "string"

279 },

280 "model": "model",

281 "name": "name",

282 "object": "assistant",

283 "tools": [

284 {

285 "type": "code_interpreter"

286 }

287 ],

288 "response_format": "auto",

289 "temperature": 1,

290 "tool_resources": {

291 "code_interpreter": {

292 "file_ids": [

293 "string"

294 ]

295 },

296 "file_search": {

297 "vector_store_ids": [

298 "string"

299 ]

300 }

301 },

302 "top_p": 1

303}

304```

305 

306### Example

307 

308```http263```http

309curl https://api.openai.com/v1/assistants/asst_abc123 \264curl https://api.openai.com/v1/assistants/asst_abc123 \

310 -H "Content-Type: application/json" \265 -H "Content-Type: application/json" \

Details

602 602 

603### Example603### Example

604 604 

605```http

606curl https://api.openai.com/v1/assistants/$ASSISTANT_ID \

607 -H 'Content-Type: application/json' \

608 -H 'OpenAI-Beta: assistants=v2' \

609 -H "Authorization: Bearer $OPENAI_API_KEY" \

610 -d '{

611 "temperature": 1,

612 "top_p": 1

613 }'

614```

615 

616#### 200 — Example

617 

618```json

619{

620 "id": "id",

621 "created_at": 0,

622 "description": "description",

623 "instructions": "instructions",

624 "metadata": {

625 "foo": "string"

626 },

627 "model": "model",

628 "name": "name",

629 "object": "assistant",

630 "tools": [

631 {

632 "type": "code_interpreter"

633 }

634 ],

635 "response_format": "auto",

636 "temperature": 1,

637 "tool_resources": {

638 "code_interpreter": {

639 "file_ids": [

640 "string"

641 ]

642 },

643 "file_search": {

644 "vector_store_ids": [

645 "string"

646 ]

647 }

648 },

649 "top_p": 1

650}

651```

652 

653### Example

654 

655```http605```http

656curl https://api.openai.com/v1/assistants/asst_abc123 \606curl https://api.openai.com/v1/assistants/asst_abc123 \

657 -H "Content-Type: application/json" \607 -H "Content-Type: application/json" \

Details

140 140 

141### Example141### Example

142 142 

143```http

144curl https://api.openai.com/v1/chatkit/sessions/$SESSION_ID/cancel \

145 -X POST \

146 -H 'OpenAI-Beta: chatkit_beta=v1' \

147 -H "Authorization: Bearer $OPENAI_API_KEY"

148```

149 

150#### 200 — Example

151 

152```json

153{

154 "id": "cksess_123",

155 "object": "chatkit.session",

156 "client_secret": "",

157 "expires_at": 1712349876,

158 "workflow": {

159 "id": "workflow_alpha",

160 "version": "2024-10-01",

161 "state_variables": {

162 "message": "hello"

163 },

164 "tracing": {

165 "enabled": true

166 }

167 },

168 "user": "user_789",

169 "rate_limits": {

170 "max_requests_per_1_minute": 60

171 },

172 "max_requests_per_1_minute": 60,

173 "status": "cancelled",

174 "chatkit_configuration": {

175 "automatic_thread_titling": {

176 "enabled": true

177 },

178 "file_upload": {

179 "enabled": true,

180 "max_file_size": 16,

181 "max_files": 20

182 },

183 "history": {

184 "enabled": true,

185 "recent_threads": 10

186 }

187 }

188}

189```

190 

191### Example

192 

193```http143```http

194curl -X POST \144curl -X POST \

195 https://api.openai.com/v1/chatkit/sessions/cksess_123/cancel \145 https://api.openai.com/v1/chatkit/sessions/cksess_123/cancel \

Details

248 248 

249### Example249### Example

250 250 

251```http

252curl https://api.openai.com/v1/chatkit/sessions \

253 -H 'Content-Type: application/json' \

254 -H 'OpenAI-Beta: chatkit_beta=v1' \

255 -H "Authorization: Bearer $OPENAI_API_KEY" \

256 -d '{

257 "user": "x",

258 "workflow": {

259 "id": "id"

260 }

261 }'

262```

263 

264#### 200 — Example

265 

266```json

267{

268 "id": "cksess_123",

269 "chatkit_configuration": {

270 "automatic_thread_titling": {

271 "enabled": true

272 },

273 "file_upload": {

274 "enabled": true,

275 "max_file_size": 16,

276 "max_files": 20

277 },

278 "history": {

279 "enabled": true,

280 "recent_threads": 10

281 }

282 },

283 "client_secret": "ek_token_123",

284 "expires_at": 1712349876,

285 "max_requests_per_1_minute": 60,

286 "object": "chatkit.session",

287 "rate_limits": {

288 "max_requests_per_1_minute": 60

289 },

290 "status": "active",

291 "user": "user_789",

292 "workflow": {

293 "id": "workflow_alpha",

294 "state_variables": {

295 "message": "hello"

296 },

297 "tracing": {

298 "enabled": true

299 },

300 "version": "2024-10-01"

301 }

302}

303```

304 

305### Example

306 

307```http251```http

308curl https://api.openai.com/v1/chatkit/sessions \252curl https://api.openai.com/v1/chatkit/sessions \

309 -H "Content-Type: application/json" \253 -H "Content-Type: application/json" \

Details

128 128 

129### Example129### Example

130 130 

131```http

132curl https://api.openai.com/v1/chatkit/threads \

133 -H 'OpenAI-Beta: chatkit_beta=v1' \

134 -H "Authorization: Bearer $OPENAI_API_KEY"

135```

136 

137#### 200 — Example

138 

139```json

140{

141 "data": [

142 {

143 "id": "cthr_def456",

144 "created_at": 1712345600,

145 "object": "chatkit.thread",

146 "status": {

147 "type": "active"

148 },

149 "title": "Demo feedback",

150 "user": "user_456"

151 }

152 ],

153 "first_id": "first_id",

154 "has_more": true,

155 "last_id": "last_id",

156 "object": "list"

157}

158```

159 

160### Example

161 

162```http131```http

163curl "https://api.openai.com/v1/chatkit/threads?limit=2&order=desc" \132curl "https://api.openai.com/v1/chatkit/threads?limit=2&order=desc" \

164 -H "OpenAI-Beta: chatkit_beta=v1" \133 -H "OpenAI-Beta: chatkit_beta=v1" \

Details

454 454 

455### Example455### Example

456 456 

457```http

458curl https://api.openai.com/v1/chatkit/threads/$THREAD_ID/items \

459 -H 'OpenAI-Beta: chatkit_beta=v1' \

460 -H "Authorization: Bearer $OPENAI_API_KEY"

461```

462 

463#### 200 — Example

464 

465```json

466{

467 "data": [

468 {

469 "id": "id",

470 "attachments": [

471 {

472 "id": "id",

473 "mime_type": "mime_type",

474 "name": "name",

475 "preview_url": "https://example.com",

476 "type": "image"

477 }

478 ],

479 "content": [

480 {

481 "text": "text",

482 "type": "input_text"

483 }

484 ],

485 "created_at": 0,

486 "inference_options": {

487 "model": "model",

488 "tool_choice": {

489 "id": "id"

490 }

491 },

492 "object": "chatkit.thread_item",

493 "thread_id": "thread_id",

494 "type": "chatkit.user_message"

495 }

496 ],

497 "first_id": "first_id",

498 "has_more": true,

499 "last_id": "last_id",

500 "object": "list"

501}

502```

503 

504### Example

505 

506```http457```http

507curl "https://api.openai.com/v1/chatkit/threads/cthr_abc123/items?limit=3" \458curl "https://api.openai.com/v1/chatkit/threads/cthr_abc123/items?limit=3" \

508 -H "OpenAI-Beta: chatkit_beta=v1" \459 -H "OpenAI-Beta: chatkit_beta=v1" \

Details

86 86 

87### Example87### Example

88 88 

89```http

90curl https://api.openai.com/v1/chatkit/threads/$THREAD_ID \

91 -H 'OpenAI-Beta: chatkit_beta=v1' \

92 -H "Authorization: Bearer $OPENAI_API_KEY"

93```

94 

95#### 200 — Example

96 

97```json

98{

99 "id": "cthr_def456",

100 "created_at": 1712345600,

101 "object": "chatkit.thread",

102 "status": {

103 "type": "active"

104 },

105 "title": "Demo feedback",

106 "user": "user_456"

107}

108```

109 

110### Example

111 

112```http89```http

113curl https://api.openai.com/v1/chatkit/threads/cthr_abc123 \90curl https://api.openai.com/v1/chatkit/threads/cthr_abc123 \

114 -H "OpenAI-Beta: chatkit_beta=v1" \91 -H "OpenAI-Beta: chatkit_beta=v1" \

Details

5618 5618 

5619 - `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`5619 - `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`

5620 5620 

5621 Model ID used to generate the response, like `gpt-6-astra`. OpenAI5621 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

5622 offers a wide range of models with different capabilities, performance5622 offers a wide range of models with different capabilities, performance

5623 characteristics, and price points. Refer to the [model guide](/api/docs/models)5623 characteristics, and price points. Refer to the [model guide](/api/docs/models)

5624 to browse and compare available models.5624 to browse and compare available models.

5625 5625 

5626 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`5626 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`

5627 5627 

5628 Model ID used to generate the response, like `gpt-6-astra`. OpenAI5628 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

5629 offers a wide range of models with different capabilities, performance5629 offers a wide range of models with different capabilities, performance

5630 characteristics, and price points. Refer to the [model guide](/api/docs/models)5630 characteristics, and price points. Refer to the [model guide](/api/docs/models)

5631 to browse and compare available models.5631 to browse and compare available models.


12169 12169 

12170### Example12170### Example

12171 12171 

12172```http

12173curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \

12174 -X POST \

12175 -H "Authorization: Bearer $OPENAI_API_KEY"

12176```

12177 

12178#### 200 — Example

12179 

12180```json

12181{

12182 "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",

12183 "object": "response",

12184 "access_programs": null,

12185 "created_at": 1741476777,

12186 "status": "completed",

12187 "completed_at": 1741476778,

12188 "error": null,

12189 "incomplete_details": null,

12190 "instructions": null,

12191 "max_output_tokens": null,

12192 "model": "gpt-6-astra",

12193 "output": [

12194 {

12195 "type": "message",

12196 "id": "msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41",

12197 "status": "completed",

12198 "role": "assistant",

12199 "content": [

12200 {

12201 "type": "output_text",

12202 "text": "The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.",

12203 "annotations": [],

12204 "logprobs": []

12205 }

12206 ]

12207 }

12208 ],

12209 "parallel_tool_calls": true,

12210 "previous_response_id": null,

12211 "reasoning": {

12212 "effort": null,

12213 "summary": null,

12214 "context": null

12215 },

12216 "store": true,

12217 "temperature": 1,

12218 "text": {

12219 "format": {

12220 "type": "text"

12221 }

12222 },

12223 "tool_choice": "auto",

12224 "tools": [],

12225 "top_p": 1,

12226 "truncation": "disabled",

12227 "usage": {

12228 "input_tokens": 328,

12229 "input_tokens_details": {

12230 "cached_tokens": 0,

12231 "cache_write_tokens": 0

12232 },

12233 "output_tokens": 52,

12234 "output_tokens_details": {

12235 "reasoning_tokens": 0

12236 },

12237 "total_tokens": 380

12238 },

12239 "tool_usage": {

12240 "image_gen": {

12241 "input_tokens": 0,

12242 "input_tokens_details": {

12243 "text_tokens": 0,

12244 "image_tokens": 0

12245 },

12246 "output_tokens": 0,

12247 "output_tokens_details": {

12248 "text_tokens": 0,

12249 "image_tokens": 0

12250 },

12251 "total_tokens": 0

12252 },

12253 "web_search": {

12254 "num_requests": 0

12255 }

12256 },

12257 "user": null,

12258 "metadata": {},

12259 "conversation": {

12260 "id": "id"

12261 },

12262 "image": {

12263 "context_compression": "enabled"

12264 },

12265 "input_transformations": [

12266 {

12267 "id": "id",

12268 "action": "removed",

12269 "reason": "organization_mismatch",

12270 "type": "reasoning"

12271 }

12272 ],

12273 "moderation": {

12274 "input": {

12275 "categories": {

12276 "foo": true

12277 },

12278 "category_applied_input_types": {

12279 "foo": [

12280 "text"

12281 ]

12282 },

12283 "category_scores": {

12284 "foo": 0

12285 },

12286 "flagged": true,

12287 "model": "model",

12288 "type": "moderation_result"

12289 },

12290 "output": {

12291 "categories": {

12292 "foo": true

12293 },

12294 "category_applied_input_types": {

12295 "foo": [

12296 "text"

12297 ]

12298 },

12299 "category_scores": {

12300 "foo": 0

12301 },

12302 "flagged": true,

12303 "model": "model",

12304 "type": "moderation_result"

12305 }

12306 },

12307 "output_text": "output_text",

12308 "prompt_cache_diagnostics": {

12309 "cache_missed_tokens": 0,

12310 "reason": "model_changed",

12311 "type": "cache_miss",

12312 "comparison_reusable_tokens": 0

12313 },

12314 "prompt_cache_options": {

12315 "mode": "implicit",

12316 "ttl": "30m",

12317 "comparison_response_id": "comparison_response_id"

12318 },

12319 "service_tier": "auto"

12320}

12321```

12322 

12323### Example

12324 

12325```http12172```http

12326curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \12173curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \

12327 -H "Content-Type: application/json" \12174 -H "Content-Type: application/json" \


12343 "incomplete_details": null,12190 "incomplete_details": null,

12344 "instructions": null,12191 "instructions": null,

12345 "max_output_tokens": null,12192 "max_output_tokens": null,

12346 "model": "gpt-6-astra",12193 "model": "gpt-6.2-astra",

12347 "output": [12194 "output": [

12348 {12195 {

12349 "type": "message",12196 "type": "message",

Details

20 20 

21- `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string or null`21- `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string or null`

22 22 

23 Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.23 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.

24 24 

25 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`25 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`

26 26 

27 Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.27 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.

28 28 

29 - `"gpt-6-astra"`29 - `"gpt-6-astra"`

30 30 


11012 11012 

11013### Example11013### Example

11014 11014 

11015```http

11016curl https://api.openai.com/v1/responses/compact \

11017 -H 'Content-Type: application/json' \

11018 -H "Authorization: Bearer $OPENAI_API_KEY" \

11019 -d '{

11020 "model": "gpt-6-astra",

11021 "previous_response_id": "resp_123"

11022 }'

11023```

11024 

11025#### 200 — Example

11026 

11027```json

11028{

11029 "id": "resp_001",

11030 "created_at": 1731459200,

11031 "object": "response.compaction",

11032 "output": [

11033 {

11034 "id": "msg_001",

11035 "status": "completed",

11036 "type": "message",

11037 "role": "user",

11038 "content": [

11039 {

11040 "type": "input_text",

11041 "text": "Summarize our launch checklist from last week."

11042 }

11043 ]

11044 },

11045 {

11046 "id": "msg_002",

11047 "status": "completed",

11048 "type": "message",

11049 "role": "user",

11050 "content": [

11051 {

11052 "type": "input_text",

11053 "text": "You are performing a CONTEXT CHECKPOINT COMPACTION..."

11054 }

11055 ]

11056 },

11057 {

11058 "type": "compaction",

11059 "id": "cmp_001",

11060 "encrypted_content": "encrypted-summary"

11061 }

11062 ],

11063 "usage": {

11064 "input_tokens": 42897,

11065 "input_tokens_details": {

11066 "cache_write_tokens": 0,

11067 "cached_tokens": 0,

11068 "cache_write_tokens_details": {

11069 "ttl_12h_tokens": 0,

11070 "ttl_30m_tokens": 0

11071 }

11072 },

11073 "output_tokens": 12000,

11074 "output_tokens_details": {

11075 "reasoning_tokens": 0

11076 },

11077 "total_tokens": 54897

11078 },

11079 "image": {

11080 "context_compression": "disabled"

11081 }

11082}

11083```

11084 

11085### Example

11086 

11087```http11015```http

11088curl -X POST https://api.openai.com/v1/responses/compact \11016curl -X POST https://api.openai.com/v1/responses/compact \

11089 -H "Content-Type: application/json" \11017 -H "Content-Type: application/json" \

11090 -H "Authorization: Bearer $OPENAI_API_KEY" \11018 -H "Authorization: Bearer $OPENAI_API_KEY" \

11091 -d '{11019 -d '{

11092 "model": "gpt-6-astra",11020 "model": "gpt-6.2-astra",

11093 "input": [11021 "input": [

11094 {11022 {

11095 "role": "user",11023 "role": "user",

Details

5611 5611 

5612- `model: optional "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`5612- `model: optional "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`

5613 5613 

5614 Model ID used to generate the response, like `gpt-6-astra`. OpenAI5614 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

5615 offers a wide range of models with different capabilities, performance5615 offers a wide range of models with different capabilities, performance

5616 characteristics, and price points. Refer to the [model guide](/api/docs/models)5616 characteristics, and price points. Refer to the [model guide](/api/docs/models)

5617 to browse and compare available models.5617 to browse and compare available models.

5618 5618 

5619 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`5619 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`

5620 5620 

5621 Model ID used to generate the response, like `gpt-6-astra`. OpenAI5621 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

5622 offers a wide range of models with different capabilities, performance5622 offers a wide range of models with different capabilities, performance

5623 characteristics, and price points. Refer to the [model guide](/api/docs/models)5623 characteristics, and price points. Refer to the [model guide](/api/docs/models)

5624 to browse and compare available models.5624 to browse and compare available models.


13143 13143 

13144 - `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`13144 - `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`

13145 13145 

13146 Model ID used to generate the response, like `gpt-6-astra`. OpenAI13146 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

13147 offers a wide range of models with different capabilities, performance13147 offers a wide range of models with different capabilities, performance

13148 characteristics, and price points. Refer to the [model guide](/api/docs/models)13148 characteristics, and price points. Refer to the [model guide](/api/docs/models)

13149 to browse and compare available models.13149 to browse and compare available models.

13150 13150 

13151 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`13151 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`

13152 13152 

13153 Model ID used to generate the response, like `gpt-6-astra`. OpenAI13153 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

13154 offers a wide range of models with different capabilities, performance13154 offers a wide range of models with different capabilities, performance

13155 characteristics, and price points. Refer to the [model guide](/api/docs/models)13155 characteristics, and price points. Refer to the [model guide](/api/docs/models)

13156 to browse and compare available models.13156 to browse and compare available models.


19698curl https://api.openai.com/v1/responses \19698curl https://api.openai.com/v1/responses \

19699 -H 'Content-Type: application/json' \19699 -H 'Content-Type: application/json' \

19700 -H "Authorization: Bearer $OPENAI_API_KEY" \19700 -H "Authorization: Bearer $OPENAI_API_KEY" \

19701 -d '"string"'19701 -d '{

19702 "model": "gpt-6.2-astra",

19703 "input": "Write a one-sentence bedtime story about a unicorn."

19704 }'

19702```19705```

19703 19706 

19704#### 200 — Example19707#### 200 — Example


19715 "incomplete_details": null,19718 "incomplete_details": null,

19716 "instructions": null,19719 "instructions": null,

19717 "max_output_tokens": null,19720 "max_output_tokens": null,

19718 "model": "gpt-6-astra",19721 "model": "gpt-6.2-astra",

19719 "output": [19722 "output": [

19720 {19723 {

19721 "type": "message",19724 "type": "message",


19853 -H "Content-Type: application/json" \19856 -H "Content-Type: application/json" \

19854 -H "Authorization: Bearer $OPENAI_API_KEY" \19857 -H "Authorization: Bearer $OPENAI_API_KEY" \

19855 -d '{19858 -d '{

19856 "model": "gpt-6-astra",19859 "model": "gpt-6.2-astra",

19857 "input": [19860 "input": [

19858 {19861 {

19859 "role": "user",19862 "role": "user",


19886 "instructions": null,19889 "instructions": null,

19887 "max_output_tokens": null,19890 "max_output_tokens": null,

19888 "max_tool_calls": null,19891 "max_tool_calls": null,

19889 "model": "gpt-6-astra",19892 "model": "gpt-6.2-astra",

19890 "output": [19893 "output": [

19891 {19894 {

19892 "id": "msg_686eef60d3e081a29283bdcbc4322fd90e34c516d176ff86",19895 "id": "msg_686eef60d3e081a29283bdcbc4322fd90e34c516d176ff86",


19946 -H "Content-Type: application/json" \19949 -H "Content-Type: application/json" \

19947 -H "Authorization: Bearer $OPENAI_API_KEY" \19950 -H "Authorization: Bearer $OPENAI_API_KEY" \

19948 -d '{19951 -d '{

19949 "model": "gpt-6-astra",19952 "model": "gpt-6.2-astra",

19950 "tools": [{19953 "tools": [{

19951 "type": "file_search",19954 "type": "file_search",

19952 "vector_store_ids": ["vs_1234567890"],19955 "vector_store_ids": ["vs_1234567890"],


19970 "incomplete_details": null,19973 "incomplete_details": null,

19971 "instructions": null,19974 "instructions": null,

19972 "max_output_tokens": null,19975 "max_output_tokens": null,

19973 "model": "gpt-6-astra",19976 "model": "gpt-6.2-astra",

19974 "output": [19977 "output": [

19975 {19978 {

19976 "type": "file_search_call",19979 "type": "file_search_call",


20099 -H "Content-Type: application/json" \20102 -H "Content-Type: application/json" \

20100 -H "Authorization: Bearer $OPENAI_API_KEY" \20103 -H "Authorization: Bearer $OPENAI_API_KEY" \

20101 -d '{20104 -d '{

20102 "model": "gpt-6-astra",20105 "model": "gpt-6.2-astra",

20103 "input": "What is the weather like in Boston today?",20106 "input": "What is the weather like in Boston today?",

20104 "tools": [20107 "tools": [

20105 {20108 {


20140 "incomplete_details": null,20143 "incomplete_details": null,

20141 "instructions": null,20144 "instructions": null,

20142 "max_output_tokens": null,20145 "max_output_tokens": null,

20143 "model": "gpt-6-astra",20146 "model": "gpt-6.2-astra",

20144 "output": [20147 "output": [

20145 {20148 {

20146 "type": "function_call",20149 "type": "function_call",


20219 -H "Content-Type: application/json" \20222 -H "Content-Type: application/json" \

20220 -H "Authorization: Bearer $OPENAI_API_KEY" \20223 -H "Authorization: Bearer $OPENAI_API_KEY" \

20221 -d '{20224 -d '{

20222 "model": "gpt-6-astra",20225 "model": "gpt-6.2-astra",

20223 "input": [20226 "input": [

20224 {20227 {

20225 "role": "user",20228 "role": "user",


20249 "incomplete_details": null,20252 "incomplete_details": null,

20250 "instructions": null,20253 "instructions": null,

20251 "max_output_tokens": null,20254 "max_output_tokens": null,

20252 "model": "gpt-6-astra",20255 "model": "gpt-6.2-astra",

20253 "output": [20256 "output": [

20254 {20257 {

20255 "type": "message",20258 "type": "message",


20307 -H "Content-Type: application/json" \20310 -H "Content-Type: application/json" \

20308 -H "Authorization: Bearer $OPENAI_API_KEY" \20311 -H "Authorization: Bearer $OPENAI_API_KEY" \

20309 -d '{20312 -d '{

20310 "model": "gpt-6-astra",20313 "model": "gpt-6.2-astra",

20311 "input": "How much wood would a woodchuck chuck?",20314 "input": "How much wood would a woodchuck chuck?",

20312 "reasoning": {20315 "reasoning": {

20313 "effort": "high"20316 "effort": "high"


20329 "incomplete_details": null,20332 "incomplete_details": null,

20330 "instructions": null,20333 "instructions": null,

20331 "max_output_tokens": null,20334 "max_output_tokens": null,

20332 "model": "gpt-6-astra",20335 "model": "gpt-6.2-astra",

20333 "output": [20336 "output": [

20334 {20337 {

20335 "type": "message",20338 "type": "message",


20387 -H "Content-Type: application/json" \20390 -H "Content-Type: application/json" \

20388 -H "Authorization: Bearer $OPENAI_API_KEY" \20391 -H "Authorization: Bearer $OPENAI_API_KEY" \

20389 -d '{20392 -d '{

20390 "model": "gpt-6-astra",20393 "model": "gpt-6.2-astra",

20391 "instructions": "You are a helpful assistant.",20394 "instructions": "You are a helpful assistant.",

20392 "input": "Hello!",20395 "input": "Hello!",

20393 "stream": true20396 "stream": true


20398 20401 

20399```json20402```json

20400event: response.created20403event: response.created

20401data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}20404data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6.2-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}

20402 20405 

20403event: response.in_progress20406event: response.in_progress

20404data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}20407data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6.2-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}

20405 20408 

20406event: response.output_item.added20409event: response.output_item.added

20407data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]},"sequence_number":2}20410data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]},"sequence_number":2}


20424data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]},"sequence_number":12}20427data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]},"sequence_number":12}

20425 20428 

20426event: response.completed20429event: response.completed

20427data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0}},"user":null,"metadata":{}},"sequence_number":13}20430data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6.2-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0}},"user":null,"metadata":{}},"sequence_number":13}

20428 20431 

20429```20432```

20430 20433 


20435 -H "Content-Type: application/json" \20438 -H "Content-Type: application/json" \

20436 -H "Authorization: Bearer $OPENAI_API_KEY" \20439 -H "Authorization: Bearer $OPENAI_API_KEY" \

20437 -d '{20440 -d '{

20438 "model": "gpt-6-astra",20441 "model": "gpt-6.2-astra",

20439 "input": "Tell me a three sentence bedtime story about a unicorn."20442 "input": "Tell me a three sentence bedtime story about a unicorn."

20440 }'20443 }'

20441```20444```


20454 "incomplete_details": null,20457 "incomplete_details": null,

20455 "instructions": null,20458 "instructions": null,

20456 "max_output_tokens": null,20459 "max_output_tokens": null,

20457 "model": "gpt-6-astra",20460 "model": "gpt-6.2-astra",

20458 "output": [20461 "output": [

20459 {20462 {

20460 "type": "message",20463 "type": "message",


20512 -H "Content-Type: application/json" \20515 -H "Content-Type: application/json" \

20513 -H "Authorization: Bearer $OPENAI_API_KEY" \20516 -H "Authorization: Bearer $OPENAI_API_KEY" \

20514 -d '{20517 -d '{

20515 "model": "gpt-6-astra",20518 "model": "gpt-6.2-astra",

20516 "tools": [{ "type": "web_search_preview" }],20519 "tools": [{ "type": "web_search_preview" }],

20517 "input": "What was a positive news story from today?"20520 "input": "What was a positive news story from today?"

20518 }'20521 }'


20532 "incomplete_details": null,20535 "incomplete_details": null,

20533 "instructions": null,20536 "instructions": null,

20534 "max_output_tokens": null,20537 "max_output_tokens": null,

20535 "model": "gpt-6-astra",20538 "model": "gpt-6.2-astra",

20536 "output": [20539 "output": [

20537 {20540 {

20538 "type": "web_search_call",20541 "type": "web_search_call",

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/responses/$RESPONSE_ID \

35 -X DELETE \

36 -H "Authorization: Bearer $OPENAI_API_KEY"

37```

38 

39#### 200 — Example

40 

41```json

42{

43 "id": "id",

44 "deleted": true,

45 "object": "response.deleted"

46}

47```

48 

49### Example

50 

51```http33```http

52curl -X DELETE https://api.openai.com/v1/responses/resp_123 \34curl -X DELETE https://api.openai.com/v1/responses/resp_123 \

53 -H "Content-Type: application/json" \35 -H "Content-Type: application/json" \

Details

5662 5662 

5663 - `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`5663 - `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string`

5664 5664 

5665 Model ID used to generate the response, like `gpt-6-astra`. OpenAI5665 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

5666 offers a wide range of models with different capabilities, performance5666 offers a wide range of models with different capabilities, performance

5667 characteristics, and price points. Refer to the [model guide](/api/docs/models)5667 characteristics, and price points. Refer to the [model guide](/api/docs/models)

5668 to browse and compare available models.5668 to browse and compare available models.

5669 5669 

5670 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`5670 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`

5671 5671 

5672 Model ID used to generate the response, like `gpt-6-astra`. OpenAI5672 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

5673 offers a wide range of models with different capabilities, performance5673 offers a wide range of models with different capabilities, performance

5674 characteristics, and price points. Refer to the [model guide](/api/docs/models)5674 characteristics, and price points. Refer to the [model guide](/api/docs/models)

5675 to browse and compare available models.5675 to browse and compare available models.


12213 12213 

12214### Example12214### Example

12215 12215 

12216```http

12217curl https://api.openai.com/v1/responses/$RESPONSE_ID \

12218 -H "Authorization: Bearer $OPENAI_API_KEY"

12219```

12220 

12221#### 200 — Example

12222 

12223```json

12224{

12225 "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",

12226 "object": "response",

12227 "access_programs": null,

12228 "created_at": 1741476777,

12229 "status": "completed",

12230 "completed_at": 1741476778,

12231 "error": null,

12232 "incomplete_details": null,

12233 "instructions": null,

12234 "max_output_tokens": null,

12235 "model": "gpt-6-astra",

12236 "output": [

12237 {

12238 "type": "message",

12239 "id": "msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41",

12240 "status": "completed",

12241 "role": "assistant",

12242 "content": [

12243 {

12244 "type": "output_text",

12245 "text": "The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.",

12246 "annotations": [],

12247 "logprobs": []

12248 }

12249 ]

12250 }

12251 ],

12252 "parallel_tool_calls": true,

12253 "previous_response_id": null,

12254 "reasoning": {

12255 "effort": null,

12256 "summary": null,

12257 "context": null

12258 },

12259 "store": true,

12260 "temperature": 1,

12261 "text": {

12262 "format": {

12263 "type": "text"

12264 }

12265 },

12266 "tool_choice": "auto",

12267 "tools": [],

12268 "top_p": 1,

12269 "truncation": "disabled",

12270 "usage": {

12271 "input_tokens": 328,

12272 "input_tokens_details": {

12273 "cached_tokens": 0,

12274 "cache_write_tokens": 0

12275 },

12276 "output_tokens": 52,

12277 "output_tokens_details": {

12278 "reasoning_tokens": 0

12279 },

12280 "total_tokens": 380

12281 },

12282 "tool_usage": {

12283 "image_gen": {

12284 "input_tokens": 0,

12285 "input_tokens_details": {

12286 "text_tokens": 0,

12287 "image_tokens": 0

12288 },

12289 "output_tokens": 0,

12290 "output_tokens_details": {

12291 "text_tokens": 0,

12292 "image_tokens": 0

12293 },

12294 "total_tokens": 0

12295 },

12296 "web_search": {

12297 "num_requests": 0

12298 }

12299 },

12300 "user": null,

12301 "metadata": {},

12302 "conversation": {

12303 "id": "id"

12304 },

12305 "image": {

12306 "context_compression": "enabled"

12307 },

12308 "input_transformations": [

12309 {

12310 "id": "id",

12311 "action": "removed",

12312 "reason": "organization_mismatch",

12313 "type": "reasoning"

12314 }

12315 ],

12316 "moderation": {

12317 "input": {

12318 "categories": {

12319 "foo": true

12320 },

12321 "category_applied_input_types": {

12322 "foo": [

12323 "text"

12324 ]

12325 },

12326 "category_scores": {

12327 "foo": 0

12328 },

12329 "flagged": true,

12330 "model": "model",

12331 "type": "moderation_result"

12332 },

12333 "output": {

12334 "categories": {

12335 "foo": true

12336 },

12337 "category_applied_input_types": {

12338 "foo": [

12339 "text"

12340 ]

12341 },

12342 "category_scores": {

12343 "foo": 0

12344 },

12345 "flagged": true,

12346 "model": "model",

12347 "type": "moderation_result"

12348 }

12349 },

12350 "output_text": "output_text",

12351 "prompt_cache_diagnostics": {

12352 "cache_missed_tokens": 0,

12353 "reason": "model_changed",

12354 "type": "cache_miss",

12355 "comparison_reusable_tokens": 0

12356 },

12357 "prompt_cache_options": {

12358 "mode": "implicit",

12359 "ttl": "30m",

12360 "comparison_response_id": "comparison_response_id"

12361 },

12362 "service_tier": "auto"

12363}

12364```

12365 

12366### Example

12367 

12368```http12216```http

12369curl https://api.openai.com/v1/responses/resp_123 \12217curl https://api.openai.com/v1/responses/resp_123 \

12370 -H "Content-Type: application/json" \12218 -H "Content-Type: application/json" \


12385 "incomplete_details": null,12233 "incomplete_details": null,

12386 "instructions": null,12234 "instructions": null,

12387 "max_output_tokens": null,12235 "max_output_tokens": null,

12388 "model": "gpt-6-astra",12236 "model": "gpt-6.2-astra",

12389 "output": [12237 "output": [

12390 {12238 {

12391 "type": "message",12239 "type": "message",

Details

5319 5319 

5320### Example5320### Example

5321 5321 

5322```http

5323curl https://api.openai.com/v1/responses/$RESPONSE_ID/input_items \

5324 -H "Authorization: Bearer $OPENAI_API_KEY"

5325```

5326 

5327#### 200 — Example

5328 

5329```json

5330{

5331 "data": [

5332 {

5333 "id": "id",

5334 "content": [

5335 {

5336 "text": "text",

5337 "type": "input_text",

5338 "prompt_cache_breakpoint": {

5339 "mode": "explicit",

5340 "ttl": "30m"

5341 }

5342 }

5343 ],

5344 "role": "user",

5345 "type": "message",

5346 "agent": {

5347 "agent_name": "agent_name"

5348 },

5349 "status": "in_progress"

5350 }

5351 ],

5352 "first_id": "first_id",

5353 "has_more": true,

5354 "last_id": "last_id",

5355 "object": "list"

5356}

5357```

5358 

5359### Example

5360 

5361```http5322```http

5362curl https://api.openai.com/v1/responses/resp_abc123/input_items \5323curl https://api.openai.com/v1/responses/resp_abc123/input_items \

5363 -H "Content-Type: application/json" \5324 -H "Content-Type: application/json" \

Details

6946 6946 

6947### Example6947### Example

6948 6948 

6949```http

6950curl https://api.openai.com/v1/responses/input_tokens \

6951 -X POST \

6952 -H "Authorization: Bearer $OPENAI_API_KEY"

6953```

6954 

6955#### 200 — Example

6956 

6957```json

6958{

6959 "input_tokens": 123,

6960 "object": "response.input_tokens"

6961}

6962```

6963 

6964### Example

6965 

6966```http6949```http

6967curl -X POST https://api.openai.com/v1/responses/input_tokens \6950curl -X POST https://api.openai.com/v1/responses/input_tokens \

6968 -H "Content-Type: application/json" \6951 -H "Content-Type: application/json" \

6969 -H "Authorization: Bearer $OPENAI_API_KEY" \6952 -H "Authorization: Bearer $OPENAI_API_KEY" \

6970 -d '{6953 -d '{

6971 "model": "gpt-6-astra",6954 "model": "gpt-6.2-astra",

6972 "input": "Tell me a joke."6955 "input": "Tell me a joke."

6973 }'6956 }'

6974```6957```

Details

1027 1027 

1028### Example1028### Example

1029 1029 

1030```http

1031curl https://api.openai.com/v1/threads/runs \

1032 -H 'Content-Type: application/json' \

1033 -H 'OpenAI-Beta: assistants=v2' \

1034 -H "Authorization: Bearer $OPENAI_API_KEY" \

1035 -d '{

1036 "assistant_id": "assistant_id",

1037 "model": "gpt-4.1",

1038 "temperature": 1,

1039 "top_p": 1

1040 }'

1041```

1042 

1043#### 200 — Example

1044 

1045```json

1046{

1047 "id": "id",

1048 "assistant_id": "assistant_id",

1049 "cancelled_at": 0,

1050 "completed_at": 0,

1051 "created_at": 0,

1052 "expires_at": 0,

1053 "failed_at": 0,

1054 "incomplete_details": {

1055 "reason": "max_completion_tokens"

1056 },

1057 "instructions": "instructions",

1058 "last_error": {

1059 "code": "server_error",

1060 "message": "message"

1061 },

1062 "max_completion_tokens": 256,

1063 "max_prompt_tokens": 256,

1064 "metadata": {

1065 "foo": "string"

1066 },

1067 "model": "model",

1068 "object": "thread.run",

1069 "parallel_tool_calls": true,

1070 "required_action": {

1071 "submit_tool_outputs": {

1072 "tool_calls": [

1073 {

1074 "id": "id",

1075 "function": {

1076 "arguments": "arguments",

1077 "name": "name"

1078 },

1079 "type": "function"

1080 }

1081 ]

1082 },

1083 "type": "submit_tool_outputs"

1084 },

1085 "response_format": "auto",

1086 "started_at": 0,

1087 "status": "queued",

1088 "thread_id": "thread_id",

1089 "tool_choice": "none",

1090 "tools": [

1091 {

1092 "type": "code_interpreter"

1093 }

1094 ],

1095 "truncation_strategy": {

1096 "type": "auto",

1097 "last_messages": 1

1098 },

1099 "usage": {

1100 "completion_tokens": 0,

1101 "prompt_tokens": 0,

1102 "total_tokens": 0

1103 },

1104 "temperature": 0,

1105 "top_p": 0

1106}

1107```

1108 

1109### Example

1110 

1111```http1030```http

1112curl https://api.openai.com/v1/threads/runs \1031curl https://api.openai.com/v1/threads/runs \

1113 -H "Authorization: Bearer $OPENAI_API_KEY" \1032 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/threads/$THREAD_ID \

31 -X DELETE \

32 -H 'OpenAI-Beta: assistants=v2' \

33 -H "Authorization: Bearer $OPENAI_API_KEY"

34```

35 

36#### 200 — Example

37 

38```json

39{

40 "id": "id",

41 "deleted": true,

42 "object": "thread.deleted"

43}

44```

45 

46### Example

47 

48```http29```http

49curl https://api.openai.com/v1/threads/thread_abc123 \30curl https://api.openai.com/v1/threads/thread_abc123 \

50 -H "Content-Type: application/json" \31 -H "Content-Type: application/json" \

Details

65 65 

66### Example66### Example

67 67 

68```http

69curl https://api.openai.com/v1/threads/$THREAD_ID \

70 -H 'OpenAI-Beta: assistants=v2' \

71 -H "Authorization: Bearer $OPENAI_API_KEY"

72```

73 

74#### 200 — Example

75 

76```json

77{

78 "id": "id",

79 "created_at": 0,

80 "metadata": {

81 "foo": "string"

82 },

83 "object": "thread",

84 "tool_resources": {

85 "code_interpreter": {

86 "file_ids": [

87 "string"

88 ]

89 },

90 "file_search": {

91 "vector_store_ids": [

92 "string"

93 ]

94 }

95 }

96}

97```

98 

99### Example

100 

101```http68```http

102curl https://api.openai.com/v1/threads/thread_abc123 \69curl https://api.openai.com/v1/threads/thread_abc123 \

103 -H "Content-Type: application/json" \70 -H "Content-Type: application/json" \

Details

98 98 

99### Example99### Example

100 100 

101```http

102curl https://api.openai.com/v1/threads/$THREAD_ID \

103 -H 'Content-Type: application/json' \

104 -H 'OpenAI-Beta: assistants=v2' \

105 -H "Authorization: Bearer $OPENAI_API_KEY" \

106 -d '{}'

107```

108 

109#### 200 — Example

110 

111```json

112{

113 "id": "id",

114 "created_at": 0,

115 "metadata": {

116 "foo": "string"

117 },

118 "object": "thread",

119 "tool_resources": {

120 "code_interpreter": {

121 "file_ids": [

122 "string"

123 ]

124 },

125 "file_search": {

126 "vector_store_ids": [

127 "string"

128 ]

129 }

130 }

131}

132```

133 

134### Example

135 

136```http101```http

137curl https://api.openai.com/v1/threads/thread_abc123 \102curl https://api.openai.com/v1/threads/thread_abc123 \

138 -H "Content-Type: application/json" \103 -H "Content-Type: application/json" \

Details

411 411 

412### Example412### Example

413 413 

414```http

415curl https://api.openai.com/v1/threads/$THREAD_ID/messages \

416 -H 'Content-Type: application/json' \

417 -H 'OpenAI-Beta: assistants=v2' \

418 -H "Authorization: Bearer $OPENAI_API_KEY" \

419 -d '{

420 "content": "string",

421 "role": "user"

422 }'

423```

424 

425#### 200 — Example

426 

427```json

428{

429 "id": "id",

430 "assistant_id": "assistant_id",

431 "attachments": [

432 {

433 "file_id": "file_id",

434 "tools": [

435 {

436 "type": "code_interpreter"

437 }

438 ]

439 }

440 ],

441 "completed_at": 0,

442 "content": [

443 {

444 "image_file": {

445 "file_id": "file_id",

446 "detail": "auto"

447 },

448 "type": "image_file"

449 }

450 ],

451 "created_at": 0,

452 "incomplete_at": 0,

453 "incomplete_details": {

454 "reason": "content_filter"

455 },

456 "metadata": {

457 "foo": "string"

458 },

459 "object": "thread.message",

460 "role": "user",

461 "run_id": "run_id",

462 "status": "in_progress",

463 "thread_id": "thread_id"

464}

465```

466 

467### Example

468 

469```http414```http

470curl https://api.openai.com/v1/threads/thread_abc123/messages \415curl https://api.openai.com/v1/threads/thread_abc123/messages \

471 -H "Content-Type: application/json" \416 -H "Content-Type: application/json" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/threads/$THREAD_ID/messages/$MESSAGE_ID \

35 -X DELETE \

36 -H 'OpenAI-Beta: assistants=v2' \

37 -H "Authorization: Bearer $OPENAI_API_KEY"

38```

39 

40#### 200 — Example

41 

42```json

43{

44 "id": "id",

45 "deleted": true,

46 "object": "thread.message.deleted"

47}

48```

49 

50### Example

51 

52```http33```http

53curl -X DELETE https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \34curl -X DELETE https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \

54 -H "Content-Type: application/json" \35 -H "Content-Type: application/json" \

Details

309 309 

310### Example310### Example

311 311 

312```http

313curl https://api.openai.com/v1/threads/$THREAD_ID/messages \

314 -H 'OpenAI-Beta: assistants=v2' \

315 -H "Authorization: Bearer $OPENAI_API_KEY"

316```

317 

318#### 200 — Example

319 

320```json

321{

322 "data": [

323 {

324 "id": "id",

325 "assistant_id": "assistant_id",

326 "attachments": [

327 {

328 "file_id": "file_id",

329 "tools": [

330 {

331 "type": "code_interpreter"

332 }

333 ]

334 }

335 ],

336 "completed_at": 0,

337 "content": [

338 {

339 "image_file": {

340 "file_id": "file_id",

341 "detail": "auto"

342 },

343 "type": "image_file"

344 }

345 ],

346 "created_at": 0,

347 "incomplete_at": 0,

348 "incomplete_details": {

349 "reason": "content_filter"

350 },

351 "metadata": {

352 "foo": "string"

353 },

354 "object": "thread.message",

355 "role": "user",

356 "run_id": "run_id",

357 "status": "in_progress",

358 "thread_id": "thread_id"

359 }

360 ],

361 "first_id": "msg_abc123",

362 "has_more": false,

363 "last_id": "msg_abc123",

364 "object": "list"

365}

366```

367 

368### Example

369 

370```http312```http

371curl https://api.openai.com/v1/threads/thread_abc123/messages \313curl https://api.openai.com/v1/threads/thread_abc123/messages \

372 -H "Content-Type: application/json" \314 -H "Content-Type: application/json" \

Details

281 281 

282### Example282### Example

283 283 

284```http

285curl https://api.openai.com/v1/threads/$THREAD_ID/messages/$MESSAGE_ID \

286 -H 'OpenAI-Beta: assistants=v2' \

287 -H "Authorization: Bearer $OPENAI_API_KEY"

288```

289 

290#### 200 — Example

291 

292```json

293{

294 "id": "id",

295 "assistant_id": "assistant_id",

296 "attachments": [

297 {

298 "file_id": "file_id",

299 "tools": [

300 {

301 "type": "code_interpreter"

302 }

303 ]

304 }

305 ],

306 "completed_at": 0,

307 "content": [

308 {

309 "image_file": {

310 "file_id": "file_id",

311 "detail": "auto"

312 },

313 "type": "image_file"

314 }

315 ],

316 "created_at": 0,

317 "incomplete_at": 0,

318 "incomplete_details": {

319 "reason": "content_filter"

320 },

321 "metadata": {

322 "foo": "string"

323 },

324 "object": "thread.message",

325 "role": "user",

326 "run_id": "run_id",

327 "status": "in_progress",

328 "thread_id": "thread_id"

329}

330```

331 

332### Example

333 

334```http284```http

335curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \285curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \

336 -H "Content-Type: application/json" \286 -H "Content-Type: application/json" \

Details

294 294 

295### Example295### Example

296 296 

297```http

298curl https://api.openai.com/v1/threads/$THREAD_ID/messages/$MESSAGE_ID \

299 -H 'Content-Type: application/json' \

300 -H 'OpenAI-Beta: assistants=v2' \

301 -H "Authorization: Bearer $OPENAI_API_KEY" \

302 -d '{}'

303```

304 

305#### 200 — Example

306 

307```json

308{

309 "id": "id",

310 "assistant_id": "assistant_id",

311 "attachments": [

312 {

313 "file_id": "file_id",

314 "tools": [

315 {

316 "type": "code_interpreter"

317 }

318 ]

319 }

320 ],

321 "completed_at": 0,

322 "content": [

323 {

324 "image_file": {

325 "file_id": "file_id",

326 "detail": "auto"

327 },

328 "type": "image_file"

329 }

330 ],

331 "created_at": 0,

332 "incomplete_at": 0,

333 "incomplete_details": {

334 "reason": "content_filter"

335 },

336 "metadata": {

337 "foo": "string"

338 },

339 "object": "thread.message",

340 "role": "user",

341 "run_id": "run_id",

342 "status": "in_progress",

343 "thread_id": "thread_id"

344}

345```

346 

347### Example

348 

349```http297```http

350curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \298curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \

351 -H "Content-Type: application/json" \299 -H "Content-Type: application/json" \

Details

442 442 

443### Example443### Example

444 444 

445```http

446curl https://api.openai.com/v1/threads/$THREAD_ID/runs/$RUN_ID/cancel \

447 -X POST \

448 -H 'OpenAI-Beta: assistants=v2' \

449 -H "Authorization: Bearer $OPENAI_API_KEY"

450```

451 

452#### 200 — Example

453 

454```json

455{

456 "id": "id",

457 "assistant_id": "assistant_id",

458 "cancelled_at": 0,

459 "completed_at": 0,

460 "created_at": 0,

461 "expires_at": 0,

462 "failed_at": 0,

463 "incomplete_details": {

464 "reason": "max_completion_tokens"

465 },

466 "instructions": "instructions",

467 "last_error": {

468 "code": "server_error",

469 "message": "message"

470 },

471 "max_completion_tokens": 256,

472 "max_prompt_tokens": 256,

473 "metadata": {

474 "foo": "string"

475 },

476 "model": "model",

477 "object": "thread.run",

478 "parallel_tool_calls": true,

479 "required_action": {

480 "submit_tool_outputs": {

481 "tool_calls": [

482 {

483 "id": "id",

484 "function": {

485 "arguments": "arguments",

486 "name": "name"

487 },

488 "type": "function"

489 }

490 ]

491 },

492 "type": "submit_tool_outputs"

493 },

494 "response_format": "auto",

495 "started_at": 0,

496 "status": "queued",

497 "thread_id": "thread_id",

498 "tool_choice": "none",

499 "tools": [

500 {

501 "type": "code_interpreter"

502 }

503 ],

504 "truncation_strategy": {

505 "type": "auto",

506 "last_messages": 1

507 },

508 "usage": {

509 "completion_tokens": 0,

510 "prompt_tokens": 0,

511 "total_tokens": 0

512 },

513 "temperature": 0,

514 "top_p": 0

515}

516```

517 

518### Example

519 

520```http445```http

521curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/cancel \446curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/cancel \

522 -H "Authorization: Bearer $OPENAI_API_KEY" \447 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

968 968 

969### Example969### Example

970 970 

971```http

972curl https://api.openai.com/v1/threads/$THREAD_ID/runs \

973 -H 'Content-Type: application/json' \

974 -H 'OpenAI-Beta: assistants=v2' \

975 -H "Authorization: Bearer $OPENAI_API_KEY" \

976 -d '{

977 "assistant_id": "assistant_id",

978 "model": "gpt-4.1",

979 "temperature": 1,

980 "top_p": 1

981 }'

982```

983 

984#### 200 — Example

985 

986```json

987{

988 "id": "id",

989 "assistant_id": "assistant_id",

990 "cancelled_at": 0,

991 "completed_at": 0,

992 "created_at": 0,

993 "expires_at": 0,

994 "failed_at": 0,

995 "incomplete_details": {

996 "reason": "max_completion_tokens"

997 },

998 "instructions": "instructions",

999 "last_error": {

1000 "code": "server_error",

1001 "message": "message"

1002 },

1003 "max_completion_tokens": 256,

1004 "max_prompt_tokens": 256,

1005 "metadata": {

1006 "foo": "string"

1007 },

1008 "model": "model",

1009 "object": "thread.run",

1010 "parallel_tool_calls": true,

1011 "required_action": {

1012 "submit_tool_outputs": {

1013 "tool_calls": [

1014 {

1015 "id": "id",

1016 "function": {

1017 "arguments": "arguments",

1018 "name": "name"

1019 },

1020 "type": "function"

1021 }

1022 ]

1023 },

1024 "type": "submit_tool_outputs"

1025 },

1026 "response_format": "auto",

1027 "started_at": 0,

1028 "status": "queued",

1029 "thread_id": "thread_id",

1030 "tool_choice": "none",

1031 "tools": [

1032 {

1033 "type": "code_interpreter"

1034 }

1035 ],

1036 "truncation_strategy": {

1037 "type": "auto",

1038 "last_messages": 1

1039 },

1040 "usage": {

1041 "completion_tokens": 0,

1042 "prompt_tokens": 0,

1043 "total_tokens": 0

1044 },

1045 "temperature": 0,

1046 "top_p": 0

1047}

1048```

1049 

1050### Example

1051 

1052```http971```http

1053curl https://api.openai.com/v1/threads/thread_abc123/runs \972curl https://api.openai.com/v1/threads/thread_abc123/runs \

1054 -H "Authorization: Bearer $OPENAI_API_KEY" \973 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

466 466 

467### Example467### Example

468 468 

469```http

470curl https://api.openai.com/v1/threads/$THREAD_ID/runs \

471 -H 'OpenAI-Beta: assistants=v2' \

472 -H "Authorization: Bearer $OPENAI_API_KEY"

473```

474 

475#### 200 — Example

476 

477```json

478{

479 "data": [

480 {

481 "id": "id",

482 "assistant_id": "assistant_id",

483 "cancelled_at": 0,

484 "completed_at": 0,

485 "created_at": 0,

486 "expires_at": 0,

487 "failed_at": 0,

488 "incomplete_details": {

489 "reason": "max_completion_tokens"

490 },

491 "instructions": "instructions",

492 "last_error": {

493 "code": "server_error",

494 "message": "message"

495 },

496 "max_completion_tokens": 256,

497 "max_prompt_tokens": 256,

498 "metadata": {

499 "foo": "string"

500 },

501 "model": "model",

502 "object": "thread.run",

503 "parallel_tool_calls": true,

504 "required_action": {

505 "submit_tool_outputs": {

506 "tool_calls": [

507 {

508 "id": "id",

509 "function": {

510 "arguments": "arguments",

511 "name": "name"

512 },

513 "type": "function"

514 }

515 ]

516 },

517 "type": "submit_tool_outputs"

518 },

519 "response_format": "auto",

520 "started_at": 0,

521 "status": "queued",

522 "thread_id": "thread_id",

523 "tool_choice": "none",

524 "tools": [

525 {

526 "type": "code_interpreter"

527 }

528 ],

529 "truncation_strategy": {

530 "type": "auto",

531 "last_messages": 1

532 },

533 "usage": {

534 "completion_tokens": 0,

535 "prompt_tokens": 0,

536 "total_tokens": 0

537 },

538 "temperature": 0,

539 "top_p": 0

540 }

541 ],

542 "first_id": "run_abc123",

543 "has_more": false,

544 "last_id": "run_abc456",

545 "object": "list"

546}

547```

548 

549### Example

550 

551```http469```http

552curl https://api.openai.com/v1/threads/thread_abc123/runs \470curl https://api.openai.com/v1/threads/thread_abc123/runs \

553 -H "Authorization: Bearer $OPENAI_API_KEY" \471 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

442 442 

443### Example443### Example

444 444 

445```http

446curl https://api.openai.com/v1/threads/$THREAD_ID/runs/$RUN_ID \

447 -H 'OpenAI-Beta: assistants=v2' \

448 -H "Authorization: Bearer $OPENAI_API_KEY"

449```

450 

451#### 200 — Example

452 

453```json

454{

455 "id": "id",

456 "assistant_id": "assistant_id",

457 "cancelled_at": 0,

458 "completed_at": 0,

459 "created_at": 0,

460 "expires_at": 0,

461 "failed_at": 0,

462 "incomplete_details": {

463 "reason": "max_completion_tokens"

464 },

465 "instructions": "instructions",

466 "last_error": {

467 "code": "server_error",

468 "message": "message"

469 },

470 "max_completion_tokens": 256,

471 "max_prompt_tokens": 256,

472 "metadata": {

473 "foo": "string"

474 },

475 "model": "model",

476 "object": "thread.run",

477 "parallel_tool_calls": true,

478 "required_action": {

479 "submit_tool_outputs": {

480 "tool_calls": [

481 {

482 "id": "id",

483 "function": {

484 "arguments": "arguments",

485 "name": "name"

486 },

487 "type": "function"

488 }

489 ]

490 },

491 "type": "submit_tool_outputs"

492 },

493 "response_format": "auto",

494 "started_at": 0,

495 "status": "queued",

496 "thread_id": "thread_id",

497 "tool_choice": "none",

498 "tools": [

499 {

500 "type": "code_interpreter"

501 }

502 ],

503 "truncation_strategy": {

504 "type": "auto",

505 "last_messages": 1

506 },

507 "usage": {

508 "completion_tokens": 0,

509 "prompt_tokens": 0,

510 "total_tokens": 0

511 },

512 "temperature": 0,

513 "top_p": 0

514}

515```

516 

517### Example

518 

519```http445```http

520curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \446curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \

521 -H "Authorization: Bearer $OPENAI_API_KEY" \447 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

462 462 

463### Example463### Example

464 464 

465```http

466curl https://api.openai.com/v1/threads/$THREAD_ID/runs/$RUN_ID/submit_tool_outputs \

467 -H 'Content-Type: application/json' \

468 -H 'OpenAI-Beta: assistants=v2' \

469 -H "Authorization: Bearer $OPENAI_API_KEY" \

470 -d '{

471 "tool_outputs": [

472 {}

473 ]

474 }'

475```

476 

477#### 200 — Example

478 

479```json

480{

481 "id": "id",

482 "assistant_id": "assistant_id",

483 "cancelled_at": 0,

484 "completed_at": 0,

485 "created_at": 0,

486 "expires_at": 0,

487 "failed_at": 0,

488 "incomplete_details": {

489 "reason": "max_completion_tokens"

490 },

491 "instructions": "instructions",

492 "last_error": {

493 "code": "server_error",

494 "message": "message"

495 },

496 "max_completion_tokens": 256,

497 "max_prompt_tokens": 256,

498 "metadata": {

499 "foo": "string"

500 },

501 "model": "model",

502 "object": "thread.run",

503 "parallel_tool_calls": true,

504 "required_action": {

505 "submit_tool_outputs": {

506 "tool_calls": [

507 {

508 "id": "id",

509 "function": {

510 "arguments": "arguments",

511 "name": "name"

512 },

513 "type": "function"

514 }

515 ]

516 },

517 "type": "submit_tool_outputs"

518 },

519 "response_format": "auto",

520 "started_at": 0,

521 "status": "queued",

522 "thread_id": "thread_id",

523 "tool_choice": "none",

524 "tools": [

525 {

526 "type": "code_interpreter"

527 }

528 ],

529 "truncation_strategy": {

530 "type": "auto",

531 "last_messages": 1

532 },

533 "usage": {

534 "completion_tokens": 0,

535 "prompt_tokens": 0,

536 "total_tokens": 0

537 },

538 "temperature": 0,

539 "top_p": 0

540}

541```

542 

543### Example

544 

545```http465```http

546curl https://api.openai.com/v1/threads/thread_123/runs/run_123/submit_tool_outputs \466curl https://api.openai.com/v1/threads/thread_123/runs/run_123/submit_tool_outputs \

547 -H "Authorization: Bearer $OPENAI_API_KEY" \467 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

455 455 

456### Example456### Example

457 457 

458```http

459curl https://api.openai.com/v1/threads/$THREAD_ID/runs/$RUN_ID \

460 -H 'Content-Type: application/json' \

461 -H 'OpenAI-Beta: assistants=v2' \

462 -H "Authorization: Bearer $OPENAI_API_KEY" \

463 -d '{}'

464```

465 

466#### 200 — Example

467 

468```json

469{

470 "id": "id",

471 "assistant_id": "assistant_id",

472 "cancelled_at": 0,

473 "completed_at": 0,

474 "created_at": 0,

475 "expires_at": 0,

476 "failed_at": 0,

477 "incomplete_details": {

478 "reason": "max_completion_tokens"

479 },

480 "instructions": "instructions",

481 "last_error": {

482 "code": "server_error",

483 "message": "message"

484 },

485 "max_completion_tokens": 256,

486 "max_prompt_tokens": 256,

487 "metadata": {

488 "foo": "string"

489 },

490 "model": "model",

491 "object": "thread.run",

492 "parallel_tool_calls": true,

493 "required_action": {

494 "submit_tool_outputs": {

495 "tool_calls": [

496 {

497 "id": "id",

498 "function": {

499 "arguments": "arguments",

500 "name": "name"

501 },

502 "type": "function"

503 }

504 ]

505 },

506 "type": "submit_tool_outputs"

507 },

508 "response_format": "auto",

509 "started_at": 0,

510 "status": "queued",

511 "thread_id": "thread_id",

512 "tool_choice": "none",

513 "tools": [

514 {

515 "type": "code_interpreter"

516 }

517 ],

518 "truncation_strategy": {

519 "type": "auto",

520 "last_messages": 1

521 },

522 "usage": {

523 "completion_tokens": 0,

524 "prompt_tokens": 0,

525 "total_tokens": 0

526 },

527 "temperature": 0,

528 "top_p": 0

529}

530```

531 

532### Example

533 

534```http458```http

535curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \459curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123 \

536 -H "Authorization: Bearer $OPENAI_API_KEY" \460 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

357 357 

358### Example358### Example

359 359 

360```http

361curl https://api.openai.com/v1/threads/$THREAD_ID/runs/$RUN_ID/steps \

362 -H 'OpenAI-Beta: assistants=v2' \

363 -H "Authorization: Bearer $OPENAI_API_KEY"

364```

365 

366#### 200 — Example

367 

368```json

369{

370 "data": [

371 {

372 "id": "id",

373 "assistant_id": "assistant_id",

374 "cancelled_at": 0,

375 "completed_at": 0,

376 "created_at": 0,

377 "expired_at": 0,

378 "failed_at": 0,

379 "last_error": {

380 "code": "server_error",

381 "message": "message"

382 },

383 "metadata": {

384 "foo": "string"

385 },

386 "object": "thread.run.step",

387 "run_id": "run_id",

388 "status": "in_progress",

389 "step_details": {

390 "message_creation": {

391 "message_id": "message_id"

392 },

393 "type": "message_creation"

394 },

395 "thread_id": "thread_id",

396 "type": "message_creation",

397 "usage": {

398 "completion_tokens": 0,

399 "prompt_tokens": 0,

400 "total_tokens": 0

401 }

402 }

403 ],

404 "first_id": "step_abc123",

405 "has_more": false,

406 "last_id": "step_abc456",

407 "object": "list"

408}

409```

410 

411### Example

412 

413```http360```http

414curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps \361curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps \

415 -H "Authorization: Bearer $OPENAI_API_KEY" \362 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

335 335 

336### Example336### Example

337 337 

338```http

339curl https://api.openai.com/v1/threads/$THREAD_ID/runs/$RUN_ID/steps/$STEP_ID \

340 -H 'OpenAI-Beta: assistants=v2' \

341 -H "Authorization: Bearer $OPENAI_API_KEY"

342```

343 

344#### 200 — Example

345 

346```json

347{

348 "id": "id",

349 "assistant_id": "assistant_id",

350 "cancelled_at": 0,

351 "completed_at": 0,

352 "created_at": 0,

353 "expired_at": 0,

354 "failed_at": 0,

355 "last_error": {

356 "code": "server_error",

357 "message": "message"

358 },

359 "metadata": {

360 "foo": "string"

361 },

362 "object": "thread.run.step",

363 "run_id": "run_id",

364 "status": "in_progress",

365 "step_details": {

366 "message_creation": {

367 "message_id": "message_id"

368 },

369 "type": "message_creation"

370 },

371 "thread_id": "thread_id",

372 "type": "message_creation",

373 "usage": {

374 "completion_tokens": 0,

375 "prompt_tokens": 0,

376 "total_tokens": 0

377 }

378}

379```

380 

381### Example

382 

383```http338```http

384curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps/step_abc123 \339curl https://api.openai.com/v1/threads/thread_abc123/runs/run_abc123/steps/step_abc123 \

385 -H "Authorization: Bearer $OPENAI_API_KEY" \340 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

496 496 

497- `model: string or "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 89 more`497- `model: string or "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 89 more`

498 498 

499 Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI499 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

500 offers a wide range of models with different capabilities, performance500 offers a wide range of models with different capabilities, performance

501 characteristics, and price points. Refer to the [model guide](/api/docs/models)501 characteristics, and price points. Refer to the [model guide](/api/docs/models)

502 to browse and compare available models.502 to browse and compare available models.


505 505 

506 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 89 more`506 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 89 more`

507 507 

508 Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI508 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

509 offers a wide range of models with different capabilities, performance509 offers a wide range of models with different capabilities, performance

510 characteristics, and price points. Refer to the [model guide](/api/docs/models)510 characteristics, and price points. Refer to the [model guide](/api/docs/models)

511 to browse and compare available models.511 to browse and compare available models.


1150 1150 

1151- `stop: optional string or array of string or null`1151- `stop: optional string or array of string or null`

1152 1152 

1153 Not supported with latest reasoning models `o3` and `o4-mini`.1153 Not supported with reasoning models `o3` and `o4-mini`.

1154 1154 

1155 Up to 4 sequences where the API will stop generating further tokens. The1155 Up to 4 sequences where the API will stop generating further tokens. The

1156 returned text will not contain the stop sequence.1156 returned text will not contain the stop sequence.


1996 1996 

1997### Example1997### Example

1998 1998 

1999```http

2000curl https://api.openai.com/v1/chat/completions \

2001 -H 'Content-Type: application/json' \

2002 -H "Authorization: Bearer $OPENAI_API_KEY" \

2003 -d '{

2004 "messages": [

2005 {

2006 "content": "string",

2007 "role": "developer"

2008 }

2009 ],

2010 "model": "gpt-6-astra",

2011 "n": 1,

2012 "prompt_cache_key": "prompt-cache-key-1234",

2013 "safety_identifier": "safety-identifier-1234",

2014 "temperature": 1,

2015 "top_p": 1,

2016 "user": "user-1234"

2017 }'

2018```

2019 

2020#### 200 — Example

2021 

2022```json

2023{

2024 "id": "id",

2025 "choices": [

2026 {

2027 "finish_reason": "stop",

2028 "index": 0,

2029 "logprobs": {

2030 "content": [

2031 {

2032 "token": "token",

2033 "bytes": [

2034 0

2035 ],

2036 "logprob": 0,

2037 "top_logprobs": [

2038 {

2039 "token": "token",

2040 "bytes": [

2041 0

2042 ],

2043 "logprob": 0

2044 }

2045 ]

2046 }

2047 ],

2048 "refusal": [

2049 {

2050 "token": "token",

2051 "bytes": [

2052 0

2053 ],

2054 "logprob": 0,

2055 "top_logprobs": [

2056 {

2057 "token": "token",

2058 "bytes": [

2059 0

2060 ],

2061 "logprob": 0

2062 }

2063 ]

2064 }

2065 ]

2066 },

2067 "message": {

2068 "content": "content",

2069 "role": "assistant",

2070 "annotations": [

2071 {

2072 "type": "url_citation",

2073 "url_citation": {

2074 "end_index": 0,

2075 "start_index": 0,

2076 "title": "title",

2077 "url": "https://example.com"

2078 }

2079 }

2080 ],

2081 "audio": {

2082 "id": "id",

2083 "data": "data",

2084 "expires_at": 0,

2085 "transcript": "transcript"

2086 },

2087 "function_call": {

2088 "arguments": "arguments",

2089 "name": "name"

2090 },

2091 "refusal": "refusal",

2092 "tool_calls": [

2093 {

2094 "id": "id",

2095 "function": {

2096 "arguments": "arguments",

2097 "name": "name"

2098 },

2099 "type": "function"

2100 }

2101 ]

2102 }

2103 }

2104 ],

2105 "created": 0,

2106 "model": "model",

2107 "object": "chat.completion",

2108 "metadata": {

2109 "foo": "string"

2110 },

2111 "moderation": {

2112 "input": {

2113 "model": "model",

2114 "results": [

2115 {

2116 "categories": {

2117 "foo": true

2118 },

2119 "category_applied_input_types": {

2120 "foo": [

2121 "text"

2122 ]

2123 },

2124 "category_scores": {

2125 "foo": 0

2126 },

2127 "flagged": true,

2128 "model": "model",

2129 "type": "moderation_result"

2130 }

2131 ],

2132 "type": "moderation_results"

2133 },

2134 "output": {

2135 "model": "model",

2136 "results": [

2137 {

2138 "categories": {

2139 "foo": true

2140 },

2141 "category_applied_input_types": {

2142 "foo": [

2143 "text"

2144 ]

2145 },

2146 "category_scores": {

2147 "foo": 0

2148 },

2149 "flagged": true,

2150 "model": "model",

2151 "type": "moderation_result"

2152 }

2153 ],

2154 "type": "moderation_results"

2155 }

2156 },

2157 "service_tier": "auto",

2158 "system_fingerprint": "system_fingerprint",

2159 "usage": {

2160 "completion_tokens": 0,

2161 "prompt_tokens": 0,

2162 "total_tokens": 0,

2163 "completion_tokens_details": {

2164 "accepted_prediction_tokens": 0,

2165 "audio_tokens": 0,

2166 "reasoning_tokens": 0,

2167 "rejected_prediction_tokens": 0,

2168 "text_tokens": 0

2169 },

2170 "prompt_tokens_details": {

2171 "audio_tokens": 0,

2172 "cache_write_tokens": 0,

2173 "cached_tokens": 0,

2174 "image_tokens": 0,

2175 "text_tokens": 0

2176 }

2177 }

2178}

2179```

2180 

2181### Example

2182 

2183```http1999```http

2184curl https://api.openai.com/v1/chat/completions \2000curl https://api.openai.com/v1/chat/completions \

2185 -H "Content-Type: application/json" \2001 -H "Content-Type: application/json" \

2186 -H "Authorization: Bearer $OPENAI_API_KEY" \2002 -H "Authorization: Bearer $OPENAI_API_KEY" \

2187 -d '{2003 -d '{

2188 "model": "gpt-6-astra",2004 "model": "gpt-6.2-astra",

2189 "messages": [2005 "messages": [

2190 {2006 {

2191 "role": "developer",2007 "role": "developer",


2206 "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT",2022 "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT",

2207 "object": "chat.completion",2023 "object": "chat.completion",

2208 "created": 1741569952,2024 "created": 1741569952,

2209 "model": "gpt-6-astra",2025 "model": "gpt-6.2-astra",

2210 "choices": [2026 "choices": [

2211 {2027 {

2212 "index": 0,2028 "index": 0,


2246-H "Content-Type: application/json" \2062-H "Content-Type: application/json" \

2247-H "Authorization: Bearer $OPENAI_API_KEY" \2063-H "Authorization: Bearer $OPENAI_API_KEY" \

2248-d '{2064-d '{

2249 "model": "gpt-6-astra",2065 "model": "gpt-5.6-terra",

2250 "messages": [2066 "messages": [

2251 {2067 {

2252 "role": "user",2068 "role": "user",


2276 }2092 }

2277 }2093 }

2278 ],2094 ],

2279 "tool_choice": "auto"2095 "tool_choice": "auto",

2096 "reasoning_effort": "none"

2280}'2097}'

2281```2098```

2282 2099 


2287 "id": "chatcmpl-abc123",2104 "id": "chatcmpl-abc123",

2288 "object": "chat.completion",2105 "object": "chat.completion",

2289 "created": 1699896916,2106 "created": 1699896916,

2290 "model": "gpt-6-astra",2107 "model": "gpt-5.6-terra",

2291 "choices": [2108 "choices": [

2292 {2109 {

2293 "index": 0,2110 "index": 0,


2329 -H "Content-Type: application/json" \2146 -H "Content-Type: application/json" \

2330 -H "Authorization: Bearer $OPENAI_API_KEY" \2147 -H "Authorization: Bearer $OPENAI_API_KEY" \

2331 -d '{2148 -d '{

2332 "model": "gpt-6-astra",2149 "model": "gpt-6.2-astra",

2333 "messages": [2150 "messages": [

2334 {2151 {

2335 "role": "user",2152 "role": "user",


2358 "id": "chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG",2175 "id": "chatcmpl-B9MHDbslfkBeAs8l4bebGdFOJ6PeG",

2359 "object": "chat.completion",2176 "object": "chat.completion",

2360 "created": 1741570283,2177 "created": 1741570283,

2361 "model": "gpt-6-astra",2178 "model": "gpt-6.2-astra",

2362 "choices": [2179 "choices": [

2363 {2180 {

2364 "index": 0,2181 "index": 0,


2612 -H "Content-Type: application/json" \2429 -H "Content-Type: application/json" \

2613 -H "Authorization: Bearer $OPENAI_API_KEY" \2430 -H "Authorization: Bearer $OPENAI_API_KEY" \

2614 -d '{2431 -d '{

2615 "model": "gpt-6-astra",2432 "model": "gpt-6.2-astra",

2616 "messages": [2433 "messages": [

2617 {2434 {

2618 "role": "developer",2435 "role": "developer",


2630#### Response example2447#### Response example

2631 2448 

2632```json2449```json

2633data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}2450data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6.2-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}

2634 2451 

2635data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]}2452data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6.2-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}]}

2636 2453 

2637: Intermediate chat completion chunks omitted.2454: Intermediate chat completion chunks omitted.

2638 2455 

2639data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}2456data: {"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6.2-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}

2640 2457 

2641data: [DONE]2458data: [DONE]

2642 2459 

Details

33 33 

34### Example34### Example

35 35 

36```http

37curl https://api.openai.com/v1/chat/completions/$COMPLETION_ID \

38 -X DELETE \

39 -H "Authorization: Bearer $OPENAI_API_KEY"

40```

41 

42#### 200 — Example

43 

44```json

45{

46 "id": "id",

47 "deleted": true,

48 "object": "chat.completion.deleted"

49}

50```

51 

52### Example

53 

54```http36```http

55curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \37curl -X DELETE https://api.openai.com/v1/chat/completions/chat_abc123 \

56 -H "Authorization: Bearer $OPENAI_API_KEY" \38 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

561 561 

562### Example562### Example

563 563 

564```http

565curl https://api.openai.com/v1/chat/completions \

566 -H "Authorization: Bearer $OPENAI_API_KEY"

567```

568 

569#### 200 — Example

570 

571```json

572{

573 "data": [

574 {

575 "id": "id",

576 "choices": [

577 {

578 "finish_reason": "stop",

579 "index": 0,

580 "logprobs": {

581 "content": [

582 {

583 "token": "token",

584 "bytes": [

585 0

586 ],

587 "logprob": 0,

588 "top_logprobs": [

589 {

590 "token": "token",

591 "bytes": [

592 0

593 ],

594 "logprob": 0

595 }

596 ]

597 }

598 ],

599 "refusal": [

600 {

601 "token": "token",

602 "bytes": [

603 0

604 ],

605 "logprob": 0,

606 "top_logprobs": [

607 {

608 "token": "token",

609 "bytes": [

610 0

611 ],

612 "logprob": 0

613 }

614 ]

615 }

616 ]

617 },

618 "message": {

619 "content": "content",

620 "role": "assistant",

621 "annotations": [

622 {

623 "type": "url_citation",

624 "url_citation": {

625 "end_index": 0,

626 "start_index": 0,

627 "title": "title",

628 "url": "https://example.com"

629 }

630 }

631 ],

632 "audio": {

633 "id": "id",

634 "data": "data",

635 "expires_at": 0,

636 "transcript": "transcript"

637 },

638 "function_call": {

639 "arguments": "arguments",

640 "name": "name"

641 },

642 "refusal": "refusal",

643 "tool_calls": [

644 {

645 "id": "id",

646 "function": {

647 "arguments": "arguments",

648 "name": "name"

649 },

650 "type": "function"

651 }

652 ]

653 }

654 }

655 ],

656 "created": 0,

657 "model": "model",

658 "object": "chat.completion",

659 "metadata": {

660 "foo": "string"

661 },

662 "moderation": {

663 "input": {

664 "model": "model",

665 "results": [

666 {

667 "categories": {

668 "foo": true

669 },

670 "category_applied_input_types": {

671 "foo": [

672 "text"

673 ]

674 },

675 "category_scores": {

676 "foo": 0

677 },

678 "flagged": true,

679 "model": "model",

680 "type": "moderation_result"

681 }

682 ],

683 "type": "moderation_results"

684 },

685 "output": {

686 "model": "model",

687 "results": [

688 {

689 "categories": {

690 "foo": true

691 },

692 "category_applied_input_types": {

693 "foo": [

694 "text"

695 ]

696 },

697 "category_scores": {

698 "foo": 0

699 },

700 "flagged": true,

701 "model": "model",

702 "type": "moderation_result"

703 }

704 ],

705 "type": "moderation_results"

706 }

707 },

708 "service_tier": "auto",

709 "system_fingerprint": "system_fingerprint",

710 "usage": {

711 "completion_tokens": 0,

712 "prompt_tokens": 0,

713 "total_tokens": 0,

714 "completion_tokens_details": {

715 "accepted_prediction_tokens": 0,

716 "audio_tokens": 0,

717 "reasoning_tokens": 0,

718 "rejected_prediction_tokens": 0,

719 "text_tokens": 0

720 },

721 "prompt_tokens_details": {

722 "audio_tokens": 0,

723 "cache_write_tokens": 0,

724 "cached_tokens": 0,

725 "image_tokens": 0,

726 "text_tokens": 0

727 }

728 }

729 }

730 ],

731 "first_id": "first_id",

732 "has_more": true,

733 "last_id": "last_id",

734 "object": "list"

735}

736```

737 

738### Example

739 

740```http564```http

741curl https://api.openai.com/v1/chat/completions \565curl https://api.openai.com/v1/chat/completions \

742 -H "Authorization: Bearer $OPENAI_API_KEY" \566 -H "Authorization: Bearer $OPENAI_API_KEY" \


752 {576 {

753 "object": "chat.completion",577 "object": "chat.completion",

754 "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",578 "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",

755 "model": "gpt-6-astra",579 "model": "gpt-6.2-astra",

756 "created": 1738960610,580 "created": 1738960610,

757 "request_id": "req_ded8ab984ec4bf840f37566c1011c417",581 "request_id": "req_ded8ab984ec4bf840f37566c1011c417",

758 "tool_choice": null,582 "tool_choice": null,

Details

521 521 

522### Example522### Example

523 523 

524```http

525curl https://api.openai.com/v1/chat/completions/$COMPLETION_ID \

526 -H "Authorization: Bearer $OPENAI_API_KEY"

527```

528 

529#### 200 — Example

530 

531```json

532{

533 "id": "id",

534 "choices": [

535 {

536 "finish_reason": "stop",

537 "index": 0,

538 "logprobs": {

539 "content": [

540 {

541 "token": "token",

542 "bytes": [

543 0

544 ],

545 "logprob": 0,

546 "top_logprobs": [

547 {

548 "token": "token",

549 "bytes": [

550 0

551 ],

552 "logprob": 0

553 }

554 ]

555 }

556 ],

557 "refusal": [

558 {

559 "token": "token",

560 "bytes": [

561 0

562 ],

563 "logprob": 0,

564 "top_logprobs": [

565 {

566 "token": "token",

567 "bytes": [

568 0

569 ],

570 "logprob": 0

571 }

572 ]

573 }

574 ]

575 },

576 "message": {

577 "content": "content",

578 "role": "assistant",

579 "annotations": [

580 {

581 "type": "url_citation",

582 "url_citation": {

583 "end_index": 0,

584 "start_index": 0,

585 "title": "title",

586 "url": "https://example.com"

587 }

588 }

589 ],

590 "audio": {

591 "id": "id",

592 "data": "data",

593 "expires_at": 0,

594 "transcript": "transcript"

595 },

596 "function_call": {

597 "arguments": "arguments",

598 "name": "name"

599 },

600 "refusal": "refusal",

601 "tool_calls": [

602 {

603 "id": "id",

604 "function": {

605 "arguments": "arguments",

606 "name": "name"

607 },

608 "type": "function"

609 }

610 ]

611 }

612 }

613 ],

614 "created": 0,

615 "model": "model",

616 "object": "chat.completion",

617 "metadata": {

618 "foo": "string"

619 },

620 "moderation": {

621 "input": {

622 "model": "model",

623 "results": [

624 {

625 "categories": {

626 "foo": true

627 },

628 "category_applied_input_types": {

629 "foo": [

630 "text"

631 ]

632 },

633 "category_scores": {

634 "foo": 0

635 },

636 "flagged": true,

637 "model": "model",

638 "type": "moderation_result"

639 }

640 ],

641 "type": "moderation_results"

642 },

643 "output": {

644 "model": "model",

645 "results": [

646 {

647 "categories": {

648 "foo": true

649 },

650 "category_applied_input_types": {

651 "foo": [

652 "text"

653 ]

654 },

655 "category_scores": {

656 "foo": 0

657 },

658 "flagged": true,

659 "model": "model",

660 "type": "moderation_result"

661 }

662 ],

663 "type": "moderation_results"

664 }

665 },

666 "service_tier": "auto",

667 "system_fingerprint": "system_fingerprint",

668 "usage": {

669 "completion_tokens": 0,

670 "prompt_tokens": 0,

671 "total_tokens": 0,

672 "completion_tokens_details": {

673 "accepted_prediction_tokens": 0,

674 "audio_tokens": 0,

675 "reasoning_tokens": 0,

676 "rejected_prediction_tokens": 0,

677 "text_tokens": 0

678 },

679 "prompt_tokens_details": {

680 "audio_tokens": 0,

681 "cache_write_tokens": 0,

682 "cached_tokens": 0,

683 "image_tokens": 0,

684 "text_tokens": 0

685 }

686 }

687}

688```

689 

690### Example

691 

692```http524```http

693curl https://api.openai.com/v1/chat/completions/chatcmpl-abc123 \525curl https://api.openai.com/v1/chat/completions/chatcmpl-abc123 \

694 -H "Authorization: Bearer $OPENAI_API_KEY" \526 -H "Authorization: Bearer $OPENAI_API_KEY" \


701{533{

702 "object": "chat.completion",534 "object": "chat.completion",

703 "id": "chatcmpl-abc123",535 "id": "chatcmpl-abc123",

704 "model": "gpt-6-astra",536 "model": "gpt-6.2-astra",

705 "created": 1738960610,537 "created": 1738960610,

706 "request_id": "req_ded8ab984ec4bf840f37566c1011c417",538 "request_id": "req_ded8ab984ec4bf840f37566c1011c417",

707 "tool_choice": null,539 "tool_choice": null,

Details

535 535 

536### Example536### Example

537 537 

538```http

539curl https://api.openai.com/v1/chat/completions/$COMPLETION_ID \

540 -H 'Content-Type: application/json' \

541 -H "Authorization: Bearer $OPENAI_API_KEY" \

542 -d '{

543 "metadata": {

544 "foo": "string"

545 }

546 }'

547```

548 

549#### 200 — Example

550 

551```json

552{

553 "id": "id",

554 "choices": [

555 {

556 "finish_reason": "stop",

557 "index": 0,

558 "logprobs": {

559 "content": [

560 {

561 "token": "token",

562 "bytes": [

563 0

564 ],

565 "logprob": 0,

566 "top_logprobs": [

567 {

568 "token": "token",

569 "bytes": [

570 0

571 ],

572 "logprob": 0

573 }

574 ]

575 }

576 ],

577 "refusal": [

578 {

579 "token": "token",

580 "bytes": [

581 0

582 ],

583 "logprob": 0,

584 "top_logprobs": [

585 {

586 "token": "token",

587 "bytes": [

588 0

589 ],

590 "logprob": 0

591 }

592 ]

593 }

594 ]

595 },

596 "message": {

597 "content": "content",

598 "role": "assistant",

599 "annotations": [

600 {

601 "type": "url_citation",

602 "url_citation": {

603 "end_index": 0,

604 "start_index": 0,

605 "title": "title",

606 "url": "https://example.com"

607 }

608 }

609 ],

610 "audio": {

611 "id": "id",

612 "data": "data",

613 "expires_at": 0,

614 "transcript": "transcript"

615 },

616 "function_call": {

617 "arguments": "arguments",

618 "name": "name"

619 },

620 "refusal": "refusal",

621 "tool_calls": [

622 {

623 "id": "id",

624 "function": {

625 "arguments": "arguments",

626 "name": "name"

627 },

628 "type": "function"

629 }

630 ]

631 }

632 }

633 ],

634 "created": 0,

635 "model": "model",

636 "object": "chat.completion",

637 "metadata": {

638 "foo": "string"

639 },

640 "moderation": {

641 "input": {

642 "model": "model",

643 "results": [

644 {

645 "categories": {

646 "foo": true

647 },

648 "category_applied_input_types": {

649 "foo": [

650 "text"

651 ]

652 },

653 "category_scores": {

654 "foo": 0

655 },

656 "flagged": true,

657 "model": "model",

658 "type": "moderation_result"

659 }

660 ],

661 "type": "moderation_results"

662 },

663 "output": {

664 "model": "model",

665 "results": [

666 {

667 "categories": {

668 "foo": true

669 },

670 "category_applied_input_types": {

671 "foo": [

672 "text"

673 ]

674 },

675 "category_scores": {

676 "foo": 0

677 },

678 "flagged": true,

679 "model": "model",

680 "type": "moderation_result"

681 }

682 ],

683 "type": "moderation_results"

684 }

685 },

686 "service_tier": "auto",

687 "system_fingerprint": "system_fingerprint",

688 "usage": {

689 "completion_tokens": 0,

690 "prompt_tokens": 0,

691 "total_tokens": 0,

692 "completion_tokens_details": {

693 "accepted_prediction_tokens": 0,

694 "audio_tokens": 0,

695 "reasoning_tokens": 0,

696 "rejected_prediction_tokens": 0,

697 "text_tokens": 0

698 },

699 "prompt_tokens_details": {

700 "audio_tokens": 0,

701 "cache_write_tokens": 0,

702 "cached_tokens": 0,

703 "image_tokens": 0,

704 "text_tokens": 0

705 }

706 }

707}

708```

709 

710### Example

711 

712```http538```http

713curl -X POST https://api.openai.com/v1/chat/completions/chat_abc123 \539curl -X POST https://api.openai.com/v1/chat/completions/chat_abc123 \

714 -H "Authorization: Bearer $OPENAI_API_KEY" \540 -H "Authorization: Bearer $OPENAI_API_KEY" \


722{548{

723 "object": "chat.completion",549 "object": "chat.completion",

724 "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",550 "id": "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2",

725 "model": "gpt-6-astra",551 "model": "gpt-6.2-astra",

726 "created": 1738960610,552 "created": 1738960610,

727 "request_id": "req_ded8ab984ec4bf840f37566c1011c417",553 "request_id": "req_ded8ab984ec4bf840f37566c1011c417",

728 "tool_choice": null,554 "tool_choice": null,

Details

469### Example469### Example

470 470 

471```json471```json

472{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"obfuscation":"r4N7vQ2m"}472{"id":"chatcmpl-123","object":"chat.completion.chunk","created":1694268190,"model":"gpt-6.2-astra", "system_fingerprint": "fp_44709d6fcb", "choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"obfuscation":"r4N7vQ2m"}

473```473```

Details

112 112 

113### Example113### Example

114 114 

115```http

116curl https://api.openai.com/v1/chat/completions/$COMPLETION_ID/messages \

117 -H "Authorization: Bearer $OPENAI_API_KEY"

118```

119 

120#### 200 — Example

121 

122```json

123{

124 "data": [

125 {

126 "id": "id",

127 "content": "content",

128 "content_parts": [

129 {

130 "type": "text",

131 "file": {

132 "file_data": "file_data",

133 "file_id": "file_id",

134 "filename": "filename"

135 },

136 "image_url": {

137 "url": "url",

138 "detail": "detail"

139 },

140 "input_audio": {

141 "data": "data",

142 "format": "format"

143 },

144 "text": "text"

145 }

146 ],

147 "role": "user",

148 "name": "name"

149 }

150 ],

151 "first_id": "first_id",

152 "has_more": true,

153 "last_id": "last_id",

154 "object": "list"

155}

156```

157 

158### Example

159 

160```http115```http

161curl https://api.openai.com/v1/chat/completions/chat_abc123/messages \116curl https://api.openai.com/v1/chat/completions/chat_abc123/messages \

162 -H "Authorization: Bearer $OPENAI_API_KEY" \117 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

118 118 

119- `stop: optional string or array of string or null`119- `stop: optional string or array of string or null`

120 120 

121 Not supported with latest reasoning models `o3` and `o4-mini`.121 Not supported with reasoning models `o3` and `o4-mini`.

122 122 

123 Up to 4 sequences where the API will stop generating further tokens. The123 Up to 4 sequences where the API will stop generating further tokens. The

124 returned text will not contain the stop sequence.124 returned text will not contain the stop sequence.

Details

228 228 

229### Example229### Example

230 230 

231```http

232curl https://api.openai.com/v1/containers \

233 -H 'Content-Type: application/json' \

234 -H "Authorization: Bearer $OPENAI_API_KEY" \

235 -d '{

236 "name": "name"

237 }'

238```

239 

240#### 200 — Example

241 

242```json

243{

244 "id": "id",

245 "created_at": 0,

246 "name": "name",

247 "object": "object",

248 "status": "status",

249 "expires_after": {

250 "anchor": "last_active_at",

251 "minutes": 0

252 },

253 "last_active_at": 0,

254 "memory_limit": "1g",

255 "network_policy": {

256 "type": "allowlist",

257 "allowed_domains": [

258 "string"

259 ]

260 }

261}

262```

263 

264### Example

265 

266```http231```http

267curl https://api.openai.com/v1/containers \232curl https://api.openai.com/v1/containers \

268 -H "Authorization: Bearer $OPENAI_API_KEY" \233 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

24 24 

25### Example25### Example

26 26 

27```http

28curl https://api.openai.com/v1/containers/$CONTAINER_ID \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "id": "id",

38 "deleted": true,

39 "object": "container.deleted"

40}

41```

42 

43### Example

44 

45```http27```http

46curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \28curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \

47 -H "Authorization: Bearer $OPENAI_API_KEY"29 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

131 -H "Authorization: Bearer $OPENAI_API_KEY"131 -H "Authorization: Bearer $OPENAI_API_KEY"

132```132```

133 133 

134#### 200 — Example

135 

136```json

137{

138 "data": [

139 {

140 "id": "id",

141 "created_at": 0,

142 "name": "name",

143 "object": "object",

144 "status": "status",

145 "expires_after": {

146 "anchor": "last_active_at",

147 "minutes": 0

148 },

149 "last_active_at": 0,

150 "memory_limit": "1g",

151 "network_policy": {

152 "type": "allowlist",

153 "allowed_domains": [

154 "string"

155 ]

156 }

157 }

158 ],

159 "first_id": "first_id",

160 "has_more": true,

161 "last_id": "last_id",

162 "object": "list"

163}

164```

165 

166### Example

167 

168```http

169curl https://api.openai.com/v1/containers \

170 -H "Authorization: Bearer $OPENAI_API_KEY"

171```

172 

173#### Response example134#### Response example

174 135 

175```json136```json

Details

86 86 

87### Example87### Example

88 88 

89```http

90curl https://api.openai.com/v1/containers/$CONTAINER_ID \

91 -H "Authorization: Bearer $OPENAI_API_KEY"

92```

93 

94#### 200 — Example

95 

96```json

97{

98 "id": "id",

99 "created_at": 0,

100 "name": "name",

101 "object": "object",

102 "status": "status",

103 "expires_after": {

104 "anchor": "last_active_at",

105 "minutes": 0

106 },

107 "last_active_at": 0,

108 "memory_limit": "1g",

109 "network_policy": {

110 "type": "allowlist",

111 "allowed_domains": [

112 "string"

113 ]

114 }

115}

116```

117 

118### Example

119 

120```http89```http

121curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \90curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \

122 -H "Authorization: Bearer $OPENAI_API_KEY"91 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

58 58 

59### Example59### Example

60 60 

61```http

62curl https://api.openai.com/v1/containers/$CONTAINER_ID/files \

63 -H 'Content-Type: application/json' \

64 -H "Authorization: Bearer $OPENAI_API_KEY" \

65 -d '{}'

66```

67 

68#### 200 — Example

69 

70```json

71{

72 "id": "id",

73 "bytes": 0,

74 "container_id": "container_id",

75 "created_at": 0,

76 "object": "object",

77 "path": "path",

78 "source": "source"

79}

80```

81 

82### Example

83 

84```http61```http

85curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \62curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \

86 -H "Authorization: Bearer $OPENAI_API_KEY" \63 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

24 24 

25### Example25### Example

26 26 

27```http

28curl https://api.openai.com/v1/containers/$CONTAINER_ID/files/$FILE_ID \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "id": "id",

38 "deleted": true,

39 "object": "container.file.deleted"

40}

41```

42 

43### Example

44 

45```http27```http

46curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863/files/cfile_682e0e8a43c88191a7978f477a09bdf5 \28curl -X DELETE https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863/files/cfile_682e0e8a43c88191a7978f477a09bdf5 \

47 -H "Authorization: Bearer $OPENAI_API_KEY"29 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

84 84 

85### Example85### Example

86 86 

87```http

88curl https://api.openai.com/v1/containers/$CONTAINER_ID/files \

89 -H "Authorization: Bearer $OPENAI_API_KEY"

90```

91 

92#### 200 — Example

93 

94```json

95{

96 "data": [

97 {

98 "id": "id",

99 "bytes": 0,

100 "container_id": "container_id",

101 "created_at": 0,

102 "object": "object",

103 "path": "path",

104 "source": "source"

105 }

106 ],

107 "first_id": "first_id",

108 "has_more": true,

109 "last_id": "last_id",

110 "object": "list"

111}

112```

113 

114### Example

115 

116```http87```http

117curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \88curl https://api.openai.com/v1/containers/cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04/files \

118 -H "Authorization: Bearer $OPENAI_API_KEY"89 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

46 46 

47### Example47### Example

48 48 

49```http

50curl https://api.openai.com/v1/containers/$CONTAINER_ID/files/$FILE_ID \

51 -H "Authorization: Bearer $OPENAI_API_KEY"

52```

53 

54#### 200 — Example

55 

56```json

57{

58 "id": "id",

59 "bytes": 0,

60 "container_id": "container_id",

61 "created_at": 0,

62 "object": "object",

63 "path": "path",

64 "source": "source"

65}

66```

67 

68### Example

69 

70```http49```http

71curl https://api.openai.com/v1/containers/container_123/files/file_456 \50curl https://api.openai.com/v1/containers/container_123/files/file_456 \

72 -H "Authorization: Bearer $OPENAI_API_KEY"51 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

18 18 

19### Example19### Example

20 20 

21```http

22curl https://api.openai.com/v1/containers/$CONTAINER_ID/files/$FILE_ID/content \

23 -H "Authorization: Bearer $OPENAI_API_KEY"

24```

25 

26### Example

27 

28```http21```http

29curl https://api.openai.com/v1/containers/container_123/files/cfile_456/content \22curl https://api.openai.com/v1/containers/container_123/files/cfile_456/content \

30 -H "Authorization: Bearer $OPENAI_API_KEY"23 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

4845 4845 

4846### Example4846### Example

4847 4847 

4848```http

4849curl https://api.openai.com/v1/conversations \

4850 -X POST \

4851 -H "Authorization: Bearer $OPENAI_API_KEY"

4852```

4853 

4854#### 200 — Example

4855 

4856```json

4857{

4858 "id": "id",

4859 "created_at": 0,

4860 "metadata": {

4861 "foo": "string"

4862 },

4863 "object": "conversation"

4864}

4865```

4866 

4867### Example

4868 

4869```http4848```http

4870curl https://api.openai.com/v1/conversations \4849curl https://api.openai.com/v1/conversations \

4871 -H "Content-Type: application/json" \4850 -H "Content-Type: application/json" \

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/conversations/$CONVERSATION_ID \

31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_API_KEY"

33```

34 

35#### 200 — Example

36 

37```json

38{

39 "id": "id",

40 "deleted": true,

41 "object": "conversation.deleted"

42}

43```

44 

45### Example

46 

47```http29```http

48curl -X DELETE https://api.openai.com/v1/conversations/conv_123 \30curl -X DELETE https://api.openai.com/v1/conversations/conv_123 \

49 -H "Authorization: Bearer $OPENAI_API_KEY"31 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

39 39 

40### Example40### Example

41 41 

42```http

43curl https://api.openai.com/v1/conversations/$CONVERSATION_ID \

44 -H "Authorization: Bearer $OPENAI_API_KEY"

45```

46 

47#### 200 — Example

48 

49```json

50{

51 "id": "id",

52 "created_at": 0,

53 "metadata": {

54 "foo": "string"

55 },

56 "object": "conversation"

57}

58```

59 

60### Example

61 

62```http42```http

63curl https://api.openai.com/v1/conversations/conv_123 \43curl https://api.openai.com/v1/conversations/conv_123 \

64 -H "Authorization: Bearer $OPENAI_API_KEY"44 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

48 48 

49### Example49### Example

50 50 

51```http

52curl https://api.openai.com/v1/conversations/$CONVERSATION_ID \

53 -H 'Content-Type: application/json' \

54 -H "Authorization: Bearer $OPENAI_API_KEY" \

55 -d '{

56 "metadata": {

57 "foo": "string"

58 }

59 }'

60```

61 

62#### 200 — Example

63 

64```json

65{

66 "id": "id",

67 "created_at": 0,

68 "metadata": {

69 "foo": "string"

70 },

71 "object": "conversation"

72}

73```

74 

75### Example

76 

77```http51```http

78curl https://api.openai.com/v1/conversations/conv_123 \52curl https://api.openai.com/v1/conversations/conv_123 \

79 -H "Content-Type: application/json" \53 -H "Content-Type: application/json" \

Details

9508 9508 

9509### Example9509### Example

9510 9510 

9511```http

9512curl https://api.openai.com/v1/conversations/$CONVERSATION_ID/items \

9513 -H 'Content-Type: application/json' \

9514 -H "Authorization: Bearer $OPENAI_API_KEY" \

9515 -d '{}'

9516```

9517 

9518#### 200 — Example

9519 

9520```json

9521{

9522 "data": [

9523 {

9524 "id": "id",

9525 "content": [

9526 {

9527 "text": "text",

9528 "type": "input_text",

9529 "prompt_cache_breakpoint": {

9530 "mode": "explicit",

9531 "ttl": "30m"

9532 }

9533 }

9534 ],

9535 "role": "unknown",

9536 "status": "in_progress",

9537 "type": "message",

9538 "phase": "commentary"

9539 }

9540 ],

9541 "first_id": "first_id",

9542 "has_more": true,

9543 "last_id": "last_id",

9544 "object": "list"

9545}

9546```

9547 

9548### Example

9549 

9550```http9511```http

9551curl https://api.openai.com/v1/conversations/conv_123/items \9512curl https://api.openai.com/v1/conversations/conv_123/items \

9552 -H "Content-Type: application/json" \9513 -H "Content-Type: application/json" \

Details

43 43 

44### Example44### Example

45 45 

46```http

47curl https://api.openai.com/v1/conversations/$CONVERSATION_ID/items/$ITEM_ID \

48 -X DELETE \

49 -H "Authorization: Bearer $OPENAI_API_KEY"

50```

51 

52#### 200 — Example

53 

54```json

55{

56 "id": "id",

57 "created_at": 0,

58 "metadata": {

59 "foo": "string"

60 },

61 "object": "conversation"

62}

63```

64 

65### Example

66 

67```http46```http

68curl -X DELETE https://api.openai.com/v1/conversations/conv_123/items/msg_abc \47curl -X DELETE https://api.openai.com/v1/conversations/conv_123/items/msg_abc \

69 -H "Authorization: Bearer $OPENAI_API_KEY"48 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

4732 4732 

4733### Example4733### Example

4734 4734 

4735```http

4736curl https://api.openai.com/v1/conversations/$CONVERSATION_ID/items \

4737 -H "Authorization: Bearer $OPENAI_API_KEY"

4738```

4739 

4740#### 200 — Example

4741 

4742```json

4743{

4744 "data": [

4745 {

4746 "id": "id",

4747 "content": [

4748 {

4749 "text": "text",

4750 "type": "input_text",

4751 "prompt_cache_breakpoint": {

4752 "mode": "explicit",

4753 "ttl": "30m"

4754 }

4755 }

4756 ],

4757 "role": "unknown",

4758 "status": "in_progress",

4759 "type": "message",

4760 "phase": "commentary"

4761 }

4762 ],

4763 "first_id": "first_id",

4764 "has_more": true,

4765 "last_id": "last_id",

4766 "object": "list"

4767}

4768```

4769 

4770### Example

4771 

4772```http4735```http

4773curl "https://api.openai.com/v1/conversations/conv_123/items?limit=10" \4736curl "https://api.openai.com/v1/conversations/conv_123/items?limit=10" \

4774 -H "Authorization: Bearer $OPENAI_API_KEY"4737 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

4687 4687 

4688### Example4688### Example

4689 4689 

4690```http

4691curl https://api.openai.com/v1/conversations/$CONVERSATION_ID/items/$ITEM_ID \

4692 -H "Authorization: Bearer $OPENAI_API_KEY"

4693```

4694 

4695#### 200 — Example

4696 

4697```json

4698{

4699 "id": "id",

4700 "content": [

4701 {

4702 "text": "text",

4703 "type": "input_text",

4704 "prompt_cache_breakpoint": {

4705 "mode": "explicit",

4706 "ttl": "30m"

4707 }

4708 }

4709 ],

4710 "role": "unknown",

4711 "status": "in_progress",

4712 "type": "message",

4713 "phase": "commentary"

4714}

4715```

4716 

4717### Example

4718 

4719```http4690```http

4720curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \4691curl https://api.openai.com/v1/conversations/conv_123/items/msg_abc \

4721 -H "Authorization: Bearer $OPENAI_API_KEY"4692 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

740 740 

741### Example741### Example

742 742 

743```http

744curl https://api.openai.com/v1/decisions \

745 -H 'Content-Type: application/json' \

746 -H "Authorization: Bearer $OPENAI_API_KEY" \

747 -d '{

748 "input": "string",

749 "model": "model",

750 "questions": [

751 {

752 "instructions": "string",

753 "type": "predicate"

754 }

755 ]

756 }'

757```

758 

759#### 200 — Example

760 

761```json

762{

763 "answers": [

764 {

765 "name": "name",

766 "probability": 0,

767 "type": "predicate"

768 }

769 ],

770 "model": "model",

771 "usage": {

772 "input_tokens": -2147483648,

773 "input_tokens_details": {

774 "cache_write_tokens": -2147483648,

775 "cached_tokens": -2147483648

776 },

777 "output_tokens": -2147483648,

778 "output_tokens_details": {

779 "reasoning_tokens": -2147483648

780 },

781 "total_tokens": -2147483648

782 }

783}

784```

785 

786### Example

787 

788```http743```http

789curl https://api.openai.com/v1/decisions \744curl https://api.openai.com/v1/decisions \

790 -H "Content-Type: application/json" \745 -H "Content-Type: application/json" \

Details

118 118 

119### Example119### Example

120 120 

121```http

122curl https://api.openai.com/v1/embeddings \

123 -H 'Content-Type: application/json' \

124 -H "Authorization: Bearer $OPENAI_API_KEY" \

125 -d '{

126 "input": "The quick brown fox jumped over the lazy dog",

127 "model": "text-embedding-3-small",

128 "encoding_format": "float",

129 "user": "user-1234"

130 }'

131```

132 

133#### 200 — Example

134 

135```json

136{

137 "data": [

138 {

139 "embedding": [

140 0

141 ],

142 "index": 0,

143 "object": "embedding"

144 }

145 ],

146 "model": "model",

147 "object": "list",

148 "usage": {

149 "prompt_tokens": 0,

150 "total_tokens": 0

151 }

152}

153```

154 

155### Example

156 

157```http121```http

158curl https://api.openai.com/v1/embeddings \122curl https://api.openai.com/v1/embeddings \

159 -H "Authorization: Bearer $OPENAI_API_KEY" \123 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

727 727 

728### Example728### Example

729 729 

730```http

731curl https://api.openai.com/v1/evals \

732 -H 'Content-Type: application/json' \

733 -H "Authorization: Bearer $OPENAI_API_KEY" \

734 -d '{

735 "data_source_config": {

736 "item_schema": {

737 "foo": "bar"

738 },

739 "type": "custom"

740 },

741 "testing_criteria": [

742 {

743 "input": [

744 {

745 "content": "content",

746 "role": "role"

747 }

748 ],

749 "labels": [

750 "string"

751 ],

752 "model": "model",

753 "name": "name",

754 "passing_labels": [

755 "string"

756 ],

757 "type": "label_model"

758 }

759 ]

760 }'

761```

762 

763#### 201 — Example

764 

765```json

766{

767 "id": "id",

768 "created_at": 0,

769 "data_source_config": {

770 "schema": {

771 "type": "object",

772 "properties": {

773 "item": {

774 "type": "object",

775 "properties": {

776 "label": {

777 "type": "string"

778 }

779 },

780 "required": [

781 "label"

782 ]

783 }

784 },

785 "required": [

786 "item"

787 ]

788 },

789 "type": "custom"

790 },

791 "metadata": {

792 "foo": "string"

793 },

794 "name": "Chatbot effectiveness Evaluation",

795 "object": "eval",

796 "testing_criteria": [

797 {

798 "input": [

799 {

800 "content": "string",

801 "role": "user",

802 "type": "message"

803 }

804 ],

805 "labels": [

806 "string"

807 ],

808 "model": "model",

809 "name": "name",

810 "passing_labels": [

811 "string"

812 ],

813 "type": "label_model"

814 }

815 ]

816}

817```

818 

819### Example

820 

821```http730```http

822curl https://api.openai.com/v1/evals \731curl https://api.openai.com/v1/evals \

823 -H "Authorization: Bearer $OPENAI_API_KEY" \732 -H "Authorization: Bearer $OPENAI_API_KEY" \


833 "testing_criteria": [742 "testing_criteria": [

834 {743 {

835 "type": "label_model",744 "type": "label_model",

836 "model": "o3-mini",745 "model": "gpt-4.1-mini-2025-04-14",

837 "input": [746 "input": [

838 {747 {

839 "role": "developer",748 "role": "developer",


889 {798 {

890 "name": "Example label grader",799 "name": "Example label grader",

891 "type": "label_model",800 "type": "label_model",

892 "model": "o3-mini",801 "model": "gpt-4.1-mini-2025-04-14",

893 "input": [802 "input": [

894 {803 {

895 "type": "message",804 "type": "message",

Details

22 22 

23### Example23### Example

24 24 

25```http

26curl https://api.openai.com/v1/evals/$EVAL_ID \

27 -X DELETE \

28 -H "Authorization: Bearer $OPENAI_API_KEY"

29```

30 

31#### 200 — Example

32 

33```json

34{

35 "deleted": true,

36 "eval_id": "eval_abc123",

37 "object": "eval.deleted"

38}

39```

40 

41### Example

42 

43```http25```http

44curl https://api.openai.com/v1/evals/eval_abc123 \26curl https://api.openai.com/v1/evals/eval_abc123 \

45 -X DELETE \27 -X DELETE \

Details

422 422 

423### Example423### Example

424 424 

425```http

426curl https://api.openai.com/v1/evals \

427 -H "Authorization: Bearer $OPENAI_API_KEY"

428```

429 

430#### 200 — Example

431 

432```json

433{

434 "data": [

435 {

436 "id": "id",

437 "created_at": 0,

438 "data_source_config": {

439 "schema": {

440 "type": "object",

441 "properties": {

442 "item": {

443 "type": "object",

444 "properties": {

445 "label": {

446 "type": "string"

447 }

448 },

449 "required": [

450 "label"

451 ]

452 }

453 },

454 "required": [

455 "item"

456 ]

457 },

458 "type": "custom"

459 },

460 "metadata": {

461 "foo": "string"

462 },

463 "name": "Chatbot effectiveness Evaluation",

464 "object": "eval",

465 "testing_criteria": [

466 {

467 "input": [

468 {

469 "content": "string",

470 "role": "user",

471 "type": "message"

472 }

473 ],

474 "labels": [

475 "string"

476 ],

477 "model": "model",

478 "name": "name",

479 "passing_labels": [

480 "string"

481 ],

482 "type": "label_model"

483 }

484 ]

485 }

486 ],

487 "first_id": "first_id",

488 "has_more": true,

489 "last_id": "last_id",

490 "object": "list"

491}

492```

493 

494### Example

495 

496```http425```http

497curl https://api.openai.com/v1/evals?limit=1 \426curl https://api.openai.com/v1/evals?limit=1 \

498 -H "Authorization: Bearer $OPENAI_API_KEY" \427 -H "Authorization: Bearer $OPENAI_API_KEY" \


534 "name": "Push Notification Summary Grader",463 "name": "Push Notification Summary Grader",

535 "id": "Push Notification Summary Grader-9b876f24-4762-4be9-aff4-db7a9b31c673",464 "id": "Push Notification Summary Grader-9b876f24-4762-4be9-aff4-db7a9b31c673",

536 "type": "label_model",465 "type": "label_model",

537 "model": "o3-mini",466 "model": "gpt-4.1-mini-2025-04-14",

538 "input": [467 "input": [

539 {468 {

540 "type": "message",469 "type": "message",

Details

379 379 

380### Example380### Example

381 381 

382```http

383curl https://api.openai.com/v1/evals/$EVAL_ID \

384 -H "Authorization: Bearer $OPENAI_API_KEY"

385```

386 

387#### 200 — Example

388 

389```json

390{

391 "id": "id",

392 "created_at": 0,

393 "data_source_config": {

394 "schema": {

395 "type": "object",

396 "properties": {

397 "item": {

398 "type": "object",

399 "properties": {

400 "label": {

401 "type": "string"

402 }

403 },

404 "required": [

405 "label"

406 ]

407 }

408 },

409 "required": [

410 "item"

411 ]

412 },

413 "type": "custom"

414 },

415 "metadata": {

416 "foo": "string"

417 },

418 "name": "Chatbot effectiveness Evaluation",

419 "object": "eval",

420 "testing_criteria": [

421 {

422 "input": [

423 {

424 "content": "string",

425 "role": "user",

426 "type": "message"

427 }

428 ],

429 "labels": [

430 "string"

431 ],

432 "model": "model",

433 "name": "name",

434 "passing_labels": [

435 "string"

436 ],

437 "type": "label_model"

438 }

439 ]

440}

441```

442 

443### Example

444 

445```http382```http

446curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \383curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \

447 -H "Authorization: Bearer $OPENAI_API_KEY" \384 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

396 396 

397### Example397### Example

398 398 

399```http

400curl https://api.openai.com/v1/evals/$EVAL_ID \

401 -H 'Content-Type: application/json' \

402 -H "Authorization: Bearer $OPENAI_API_KEY" \

403 -d '{}'

404```

405 

406#### 200 — Example

407 

408```json

409{

410 "id": "id",

411 "created_at": 0,

412 "data_source_config": {

413 "schema": {

414 "type": "object",

415 "properties": {

416 "item": {

417 "type": "object",

418 "properties": {

419 "label": {

420 "type": "string"

421 }

422 },

423 "required": [

424 "label"

425 ]

426 }

427 },

428 "required": [

429 "item"

430 ]

431 },

432 "type": "custom"

433 },

434 "metadata": {

435 "foo": "string"

436 },

437 "name": "Chatbot effectiveness Evaluation",

438 "object": "eval",

439 "testing_criteria": [

440 {

441 "input": [

442 {

443 "content": "string",

444 "role": "user",

445 "type": "message"

446 }

447 ],

448 "labels": [

449 "string"

450 ],

451 "model": "model",

452 "name": "name",

453 "passing_labels": [

454 "string"

455 ],

456 "type": "label_model"

457 }

458 ]

459}

460```

461 

462### Example

463 

464```http399```http

465curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \400curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a \

466 -H "Authorization: Bearer $OPENAI_API_KEY" \401 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

143 143 

144 - `model: optional string or null`144 - `model: optional string or null`

145 145 

146 An optional model to filter by (e.g., 'gpt-6-astra').146 An optional model to filter by (e.g., 'gpt-4.1-mini-2025-04-14').

147 147 

148 - `type: "completions" (default: "completions")`148 - `type: "completions" (default: "completions")`

149 149 


519 519 

520 - `model: optional string`520 - `model: optional string`

521 521 

522 The name of the model to use for generating completions (e.g. "o3-mini").522 The model to use to sample outputs with the Chat Completions API.

523 523 

524 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`524 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`

525 525 


891 891 

892 - `model: optional string`892 - `model: optional string`

893 893 

894 The name of the model to use for generating completions (e.g. "o3-mini").894 The model to use to sample outputs with the Responses API.

895 895 

896 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`896 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`

897 897 


2370 2370 

2371### Example2371### Example

2372 2372 

2373```http

2374curl https://api.openai.com/v1/evals/$EVAL_ID/runs/$RUN_ID/cancel \

2375 -X POST \

2376 -H "Authorization: Bearer $OPENAI_API_KEY"

2377```

2378 

2379#### 200 — Example

2380 

2381```json

2382{

2383 "id": "id",

2384 "created_at": 0,

2385 "data_source": {

2386 "source": {

2387 "content": [

2388 {

2389 "item": {

2390 "foo": "bar"

2391 },

2392 "sample": {

2393 "foo": "bar"

2394 }

2395 }

2396 ],

2397 "type": "file_content"

2398 },

2399 "type": "jsonl"

2400 },

2401 "error": {

2402 "code": "code",

2403 "message": "message"

2404 },

2405 "eval_id": "eval_id",

2406 "metadata": {

2407 "foo": "string"

2408 },

2409 "model": "model",

2410 "name": "name",

2411 "object": "eval.run",

2412 "per_model_usage": [

2413 {

2414 "cached_tokens": 0,

2415 "completion_tokens": 0,

2416 "invocation_count": 0,

2417 "model_name": "model_name",

2418 "prompt_tokens": 0,

2419 "total_tokens": 0

2420 }

2421 ],

2422 "per_testing_criteria_results": [

2423 {

2424 "failed": 0,

2425 "passed": 0,

2426 "testing_criteria": "testing_criteria"

2427 }

2428 ],

2429 "report_url": "https://example.com",

2430 "result_counts": {

2431 "errored": 0,

2432 "failed": 0,

2433 "passed": 0,

2434 "total": 0

2435 },

2436 "status": "status"

2437}

2438```

2439 

2440### Example

2441 

2442```http2373```http

2443curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/cancel \2374curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/cancel \

2444 -X POST \2375 -X POST \


2455 "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a",2386 "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a",

2456 "report_url": "https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7",2387 "report_url": "https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7",

2457 "status": "canceled",2388 "status": "canceled",

2458 "model": "gpt-6-astra",2389 "model": "gpt-4.1-mini-2025-04-14",

2459 "name": "gpt-6-astra",2390 "name": "gpt-4.1-mini-2025-04-14",

2460 "created_at": 1743092069,2391 "created_at": 1743092069,

2461 "result_counts": {2392 "result_counts": {

2462 "total": 0,2393 "total": 0,


2584 }2515 }

2585 ]2516 ]

2586 },2517 },

2587 "model": "gpt-6-astra",2518 "model": "gpt-4.1-mini-2025-04-14",

2588 "sampling_params": {2519 "sampling_params": {

2589 "max_completions_tokens": 20482520 "max_completions_tokens": 2048

2590 }2521 }

Details

131 131 

132 - `model: optional string or null`132 - `model: optional string or null`

133 133 

134 An optional model to filter by (e.g., 'gpt-6-astra').134 An optional model to filter by (e.g., 'gpt-4.1-mini-2025-04-14').

135 135 

136 - `type: "completions" (default: "completions")`136 - `type: "completions" (default: "completions")`

137 137 


507 507 

508 - `model: optional string`508 - `model: optional string`

509 509 

510 The name of the model to use for generating completions (e.g. "o3-mini").510 The model to use to sample outputs with the Chat Completions API.

511 511 

512 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`512 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`

513 513 


879 879 

880 - `model: optional string`880 - `model: optional string`

881 881 

882 The name of the model to use for generating completions (e.g. "o3-mini").882 The model to use to sample outputs with the Responses API.

883 883 

884 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`884 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`

885 885 


2383 2383 

2384 - `model: optional string or null`2384 - `model: optional string or null`

2385 2385 

2386 An optional model to filter by (e.g., 'gpt-6-astra').2386 An optional model to filter by (e.g., 'gpt-4.1-mini-2025-04-14').

2387 2387 

2388 - `type: "completions" (default: "completions")`2388 - `type: "completions" (default: "completions")`

2389 2389 


2759 2759 

2760 - `model: optional string`2760 - `model: optional string`

2761 2761 

2762 The name of the model to use for generating completions (e.g. "o3-mini").2762 The model to use to sample outputs with the Chat Completions API.

2763 2763 

2764 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`2764 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`

2765 2765 


3131 3131 

3132 - `model: optional string`3132 - `model: optional string`

3133 3133 

3134 The name of the model to use for generating completions (e.g. "o3-mini").3134 The model to use to sample outputs with the Responses API.

3135 3135 

3136 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`3136 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`

3137 3137 


4610 4610 

4611### Example4611### Example

4612 4612 

4613```http

4614curl https://api.openai.com/v1/evals/$EVAL_ID/runs \

4615 -H 'Content-Type: application/json' \

4616 -H "Authorization: Bearer $OPENAI_API_KEY" \

4617 -d '{

4618 "data_source": {

4619 "source": {

4620 "content": [

4621 {

4622 "item": {

4623 "foo": "bar"

4624 }

4625 }

4626 ],

4627 "type": "file_content"

4628 },

4629 "type": "jsonl"

4630 }

4631 }'

4632```

4633 

4634#### 201 — Example

4635 

4636```json

4637{

4638 "id": "id",

4639 "created_at": 0,

4640 "data_source": {

4641 "source": {

4642 "content": [

4643 {

4644 "item": {

4645 "foo": "bar"

4646 },

4647 "sample": {

4648 "foo": "bar"

4649 }

4650 }

4651 ],

4652 "type": "file_content"

4653 },

4654 "type": "jsonl"

4655 },

4656 "error": {

4657 "code": "code",

4658 "message": "message"

4659 },

4660 "eval_id": "eval_id",

4661 "metadata": {

4662 "foo": "string"

4663 },

4664 "model": "model",

4665 "name": "name",

4666 "object": "eval.run",

4667 "per_model_usage": [

4668 {

4669 "cached_tokens": 0,

4670 "completion_tokens": 0,

4671 "invocation_count": 0,

4672 "model_name": "model_name",

4673 "prompt_tokens": 0,

4674 "total_tokens": 0

4675 }

4676 ],

4677 "per_testing_criteria_results": [

4678 {

4679 "failed": 0,

4680 "passed": 0,

4681 "testing_criteria": "testing_criteria"

4682 }

4683 ],

4684 "report_url": "https://example.com",

4685 "result_counts": {

4686 "errored": 0,

4687 "failed": 0,

4688 "passed": 0,

4689 "total": 0

4690 },

4691 "status": "status"

4692}

4693```

4694 

4695### Example

4696 

4697```http4613```http

4698curl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \4614curl https://api.openai.com/v1/evals/eval_67e579652b548190aaa83ada4b125f47/runs \

4699 -X POST \4615 -X POST \

4700 -H "Authorization: Bearer $OPENAI_API_KEY" \4616 -H "Authorization: Bearer $OPENAI_API_KEY" \

4701 -H "Content-Type: application/json" \4617 -H "Content-Type: application/json" \

4702 -d '{"name":"gpt-6-astra","data_source":{"type":"completions","input_messages":{"type":"template","template":[{"role":"developer","content":"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\" \n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\" \n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\" \n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\" \n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\" \n**Output**: \"Sports\" \n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n"} , {"role":"user","content":"{{item.input}}"}]} ,"sampling_params":{"max_completions_tokens":2048},"model":"gpt-6-astra","source":{"type":"file_content","content":[{"item":{"input":"Tech Company Launches Advanced Artificial Intelligence Platform","ground_truth":"Technology"}}]}}}'4618 -d '{"name":"gpt-4.1-mini-2025-04-14","data_source":{"type":"completions","input_messages":{"type":"template","template":[{"role":"developer","content":"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\" \n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\" \n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\" \n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\" \n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\" \n**Output**: \"Sports\" \n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n"} , {"role":"user","content":"{{item.input}}"}]} ,"sampling_params":{"max_completions_tokens":2048},"model":"gpt-4.1-mini-2025-04-14","source":{"type":"file_content","content":[{"item":{"input":"Tech Company Launches Advanced Artificial Intelligence Platform","ground_truth":"Technology"}}]}}}'

4703```4619```

4704 4620 

4705#### Response example4621#### Response example


4711 "eval_id": "eval_67e579652b548190aaa83ada4b125f47",4627 "eval_id": "eval_67e579652b548190aaa83ada4b125f47",

4712 "report_url": "https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c",4628 "report_url": "https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47&run_id=evalrun_67e57965b480819094274e3a32235e4c",

4713 "status": "queued",4629 "status": "queued",

4714 "model": "gpt-6-astra",4630 "model": "gpt-4.1-mini-2025-04-14",

4715 "name": "gpt-6-astra",4631 "name": "gpt-4.1-mini-2025-04-14",

4716 "created_at": 1743092069,4632 "created_at": 1743092069,

4717 "result_counts": {4633 "result_counts": {

4718 "total": 0,4634 "total": 0,


4756 }4672 }

4757 ]4673 ]

4758 },4674 },

4759 "model": "gpt-6-astra",4675 "model": "gpt-4.1-mini-2025-04-14",

4760 "sampling_params": {4676 "sampling_params": {

4761 "max_completions_tokens": 20484677 "max_completions_tokens": 2048

4762 }4678 }

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/evals/$EVAL_ID/runs/$RUN_ID \

31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_API_KEY"

33```

34 

35#### 200 — Example

36 

37```json

38{

39 "deleted": true,

40 "object": "eval.run.deleted",

41 "run_id": "evalrun_677469f564d48190807532a852da3afb"

42}

43```

44 

45### Example

46 

47```http29```http

48curl https://api.openai.com/v1/evals/eval_123abc/runs/evalrun_abc456 \30curl https://api.openai.com/v1/evals/eval_123abc/runs/evalrun_abc456 \

49 -X DELETE \31 -X DELETE \

Details

175 175 

176 - `model: optional string or null`176 - `model: optional string or null`

177 177 

178 An optional model to filter by (e.g., 'gpt-6-astra').178 An optional model to filter by (e.g., 'gpt-4.1-mini-2025-04-14').

179 179 

180 - `type: "completions" (default: "completions")`180 - `type: "completions" (default: "completions")`

181 181 


551 551 

552 - `model: optional string`552 - `model: optional string`

553 553 

554 The name of the model to use for generating completions (e.g. "o3-mini").554 The model to use to sample outputs with the Chat Completions API.

555 555 

556 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`556 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`

557 557 


923 923 

924 - `model: optional string`924 - `model: optional string`

925 925 

926 The name of the model to use for generating completions (e.g. "o3-mini").926 The model to use to sample outputs with the Responses API.

927 927 

928 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`928 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`

929 929 


2420 2420 

2421### Example2421### Example

2422 2422 

2423```http

2424curl https://api.openai.com/v1/evals/$EVAL_ID/runs \

2425 -H "Authorization: Bearer $OPENAI_API_KEY"

2426```

2427 

2428#### 200 — Example

2429 

2430```json

2431{

2432 "data": [

2433 {

2434 "id": "id",

2435 "created_at": 0,

2436 "data_source": {

2437 "source": {

2438 "content": [

2439 {

2440 "item": {

2441 "foo": "bar"

2442 },

2443 "sample": {

2444 "foo": "bar"

2445 }

2446 }

2447 ],

2448 "type": "file_content"

2449 },

2450 "type": "jsonl"

2451 },

2452 "error": {

2453 "code": "code",

2454 "message": "message"

2455 },

2456 "eval_id": "eval_id",

2457 "metadata": {

2458 "foo": "string"

2459 },

2460 "model": "model",

2461 "name": "name",

2462 "object": "eval.run",

2463 "per_model_usage": [

2464 {

2465 "cached_tokens": 0,

2466 "completion_tokens": 0,

2467 "invocation_count": 0,

2468 "model_name": "model_name",

2469 "prompt_tokens": 0,

2470 "total_tokens": 0

2471 }

2472 ],

2473 "per_testing_criteria_results": [

2474 {

2475 "failed": 0,

2476 "passed": 0,

2477 "testing_criteria": "testing_criteria"

2478 }

2479 ],

2480 "report_url": "https://example.com",

2481 "result_counts": {

2482 "errored": 0,

2483 "failed": 0,

2484 "passed": 0,

2485 "total": 0

2486 },

2487 "status": "status"

2488 }

2489 ],

2490 "first_id": "first_id",

2491 "has_more": true,

2492 "last_id": "last_id",

2493 "object": "list"

2494}

2495```

2496 

2497### Example

2498 

2499```http2423```http

2500curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs \2424curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs \

2501 -H "Authorization: Bearer $OPENAI_API_KEY" \2425 -H "Authorization: Bearer $OPENAI_API_KEY" \


2514 "eval_id": "eval_67e0c726d560819083f19a957c4c640b",2438 "eval_id": "eval_67e0c726d560819083f19a957c4c640b",

2515 "report_url": "https://platform.openai.com/evaluations/eval_67e0c726d560819083f19a957c4c640b",2439 "report_url": "https://platform.openai.com/evaluations/eval_67e0c726d560819083f19a957c4c640b",

2516 "status": "completed",2440 "status": "completed",

2517 "model": "o3-mini",2441 "model": "gpt-4.1-mini-2025-04-14",

2518 "name": "bulk_with_negative_examples_o3-mini",2442 "name": "bulk_with_negative_examples_gpt-4.1-mini-2025-04-14",

2519 "created_at": 1742784467,2443 "created_at": 1742784467,

2520 "result_counts": {2444 "result_counts": {

2521 "total": 1,2445 "total": 1,


2525 },2449 },

2526 "per_model_usage": [2450 "per_model_usage": [

2527 {2451 {

2528 "model_name": "o3-mini",2452 "model_name": "gpt-4.1-mini-2025-04-14",

2529 "invocation_count": 1,2453 "invocation_count": 1,

2530 "prompt_tokens": 563,2454 "prompt_tokens": 563,

2531 "completion_tokens": 874,2455 "completion_tokens": 874,


2573 }2497 }

2574 ]2498 ]

2575 },2499 },

2576 "model": "o3-mini"2500 "model": "gpt-4.1-mini-2025-04-14"

2577 },2501 },

2578 "error": null,2502 "error": null,

2579 "metadata": {}2503 "metadata": {}

Details

143 143 

144 - `model: optional string or null`144 - `model: optional string or null`

145 145 

146 An optional model to filter by (e.g., 'gpt-6-astra').146 An optional model to filter by (e.g., 'gpt-4.1-mini-2025-04-14').

147 147 

148 - `type: "completions" (default: "completions")`148 - `type: "completions" (default: "completions")`

149 149 


519 519 

520 - `model: optional string`520 - `model: optional string`

521 521 

522 The name of the model to use for generating completions (e.g. "o3-mini").522 The model to use to sample outputs with the Chat Completions API.

523 523 

524 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`524 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, response_format, 4 more }`

525 525 


891 891 

892 - `model: optional string`892 - `model: optional string`

893 893 

894 The name of the model to use for generating completions (e.g. "o3-mini").894 The model to use to sample outputs with the Responses API.

895 895 

896 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`896 - `sampling_params: optional object { max_completion_tokens, reasoning_effort, seed, 4 more }`

897 897 


2370 2370 

2371### Example2371### Example

2372 2372 

2373```http

2374curl https://api.openai.com/v1/evals/$EVAL_ID/runs/$RUN_ID \

2375 -H "Authorization: Bearer $OPENAI_API_KEY"

2376```

2377 

2378#### 200 — Example

2379 

2380```json

2381{

2382 "id": "id",

2383 "created_at": 0,

2384 "data_source": {

2385 "source": {

2386 "content": [

2387 {

2388 "item": {

2389 "foo": "bar"

2390 },

2391 "sample": {

2392 "foo": "bar"

2393 }

2394 }

2395 ],

2396 "type": "file_content"

2397 },

2398 "type": "jsonl"

2399 },

2400 "error": {

2401 "code": "code",

2402 "message": "message"

2403 },

2404 "eval_id": "eval_id",

2405 "metadata": {

2406 "foo": "string"

2407 },

2408 "model": "model",

2409 "name": "name",

2410 "object": "eval.run",

2411 "per_model_usage": [

2412 {

2413 "cached_tokens": 0,

2414 "completion_tokens": 0,

2415 "invocation_count": 0,

2416 "model_name": "model_name",

2417 "prompt_tokens": 0,

2418 "total_tokens": 0

2419 }

2420 ],

2421 "per_testing_criteria_results": [

2422 {

2423 "failed": 0,

2424 "passed": 0,

2425 "testing_criteria": "testing_criteria"

2426 }

2427 ],

2428 "report_url": "https://example.com",

2429 "result_counts": {

2430 "errored": 0,

2431 "failed": 0,

2432 "passed": 0,

2433 "total": 0

2434 },

2435 "status": "status"

2436}

2437```

2438 

2439### Example

2440 

2441```http2373```http

2442curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7 \2374curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7 \

2443 -H "Authorization: Bearer $OPENAI_API_KEY" \2375 -H "Authorization: Bearer $OPENAI_API_KEY" \


2453 "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a",2385 "eval_id": "eval_67abd54d9b0081909a86353f6fb9317a",

2454 "report_url": "https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7",2386 "report_url": "https://platform.openai.com/evaluations/eval_67abd54d9b0081909a86353f6fb9317a?run_id=evalrun_67abd54d60ec8190832b46859da808f7",

2455 "status": "queued",2387 "status": "queued",

2456 "model": "gpt-6-astra",2388 "model": "gpt-4.1-mini-2025-04-14",

2457 "name": "gpt-6-astra",2389 "name": "gpt-4.1-mini-2025-04-14",

2458 "created_at": 1743092069,2390 "created_at": 1743092069,

2459 "result_counts": {2391 "result_counts": {

2460 "total": 0,2392 "total": 0,


2582 }2514 }

2583 ]2515 ]

2584 },2516 },

2585 "model": "gpt-6-astra",2517 "model": "gpt-4.1-mini-2025-04-14",

2586 "sampling_params": {2518 "sampling_params": {

2587 "max_completions_tokens": 20482519 "max_completions_tokens": 2048

2588 }2520 }

Details

213 213 

214### Example214### Example

215 215 

216```http

217curl https://api.openai.com/v1/evals/$EVAL_ID/runs/$RUN_ID/output_items \

218 -H "Authorization: Bearer $OPENAI_API_KEY"

219```

220 

221#### 200 — Example

222 

223```json

224{

225 "data": [

226 {

227 "id": "id",

228 "created_at": 0,

229 "datasource_item": {

230 "foo": "bar"

231 },

232 "datasource_item_id": 0,

233 "eval_id": "eval_id",

234 "object": "eval.run.output_item",

235 "results": [

236 {

237 "name": "name",

238 "passed": true,

239 "score": 0,

240 "sample": {

241 "foo": "bar"

242 },

243 "type": "type"

244 }

245 ],

246 "run_id": "run_id",

247 "sample": {

248 "error": {

249 "code": "code",

250 "message": "message"

251 },

252 "finish_reason": "finish_reason",

253 "input": [

254 {

255 "content": "content",

256 "role": "role"

257 }

258 ],

259 "max_completion_tokens": 0,

260 "model": "model",

261 "output": [

262 {

263 "content": "content",

264 "role": "role"

265 }

266 ],

267 "seed": 0,

268 "temperature": 0,

269 "top_p": 0,

270 "usage": {

271 "cached_tokens": 0,

272 "completion_tokens": 0,

273 "prompt_tokens": 0,

274 "total_tokens": 0

275 }

276 },

277 "status": "status"

278 }

279 ],

280 "first_id": "first_id",

281 "has_more": true,

282 "last_id": "last_id",

283 "object": "list"

284}

285```

286 

287### Example

288 

289```http216```http

290curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs/erun_67abd54d60ec8190832b46859da808f7/output_items \217curl https://api.openai.com/v1/evals/egroup_67abd54d9b0081909a86353f6fb9317a/runs/erun_67abd54d60ec8190832b46859da808f7/output_items \

291 -H "Authorization: Bearer $OPENAI_API_KEY" \218 -H "Authorization: Bearer $OPENAI_API_KEY" \


345 }272 }

346 ],273 ],

347 "finish_reason": "stop",274 "finish_reason": "stop",

348 "model": "gpt-6-astra",275 "model": "gpt-4.1-mini-2025-04-14",

349 "usage": {276 "usage": {

350 "total_tokens": 325,277 "total_tokens": 325,

351 "completion_tokens": 2,278 "completion_tokens": 2,

Details

168 168 

169### Example169### Example

170 170 

171```http

172curl https://api.openai.com/v1/evals/$EVAL_ID/runs/$RUN_ID/output_items/$OUTPUT_ITEM_ID \

173 -H "Authorization: Bearer $OPENAI_API_KEY"

174```

175 

176#### 200 — Example

177 

178```json

179{

180 "id": "id",

181 "created_at": 0,

182 "datasource_item": {

183 "foo": "bar"

184 },

185 "datasource_item_id": 0,

186 "eval_id": "eval_id",

187 "object": "eval.run.output_item",

188 "results": [

189 {

190 "name": "name",

191 "passed": true,

192 "score": 0,

193 "sample": {

194 "foo": "bar"

195 },

196 "type": "type"

197 }

198 ],

199 "run_id": "run_id",

200 "sample": {

201 "error": {

202 "code": "code",

203 "message": "message"

204 },

205 "finish_reason": "finish_reason",

206 "input": [

207 {

208 "content": "content",

209 "role": "role"

210 }

211 ],

212 "max_completion_tokens": 0,

213 "model": "model",

214 "output": [

215 {

216 "content": "content",

217 "role": "role"

218 }

219 ],

220 "seed": 0,

221 "temperature": 0,

222 "top_p": 0,

223 "usage": {

224 "cached_tokens": 0,

225 "completion_tokens": 0,

226 "prompt_tokens": 0,

227 "total_tokens": 0

228 }

229 },

230 "status": "status"

231}

232```

233 

234### Example

235 

236```http171```http

237curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/output_items/outputitem_67abd55eb6548190bb580745d5644a33 \172curl https://api.openai.com/v1/evals/eval_67abd54d9b0081909a86353f6fb9317a/runs/evalrun_67abd54d60ec8190832b46859da808f7/output_items/outputitem_67abd55eb6548190bb580745d5644a33 \

238 -H "Authorization: Bearer $OPENAI_API_KEY" \173 -H "Authorization: Bearer $OPENAI_API_KEY" \


289 }224 }

290 ],225 ],

291 "finish_reason": "stop",226 "finish_reason": "stop",

292 "model": "gpt-6-astra",227 "model": "gpt-4.1-mini-2025-04-14",

293 "usage": {228 "usage": {

294 "total_tokens": 325,229 "total_tokens": 325,

295 "completion_tokens": 2,230 "completion_tokens": 2,

Details

18 18 

19### Example19### Example

20 20 

21```http

22curl https://api.openai.com/v1/files/$FILE_ID/content \

23 -H "Authorization: Bearer $OPENAI_API_KEY"

24```

25 

26### Example

27 

28```http21```http

29curl https://api.openai.com/v1/files/file-abc123/content \22curl https://api.openai.com/v1/files/file-abc123/content \

30 -H "Authorization: Bearer $OPENAI_API_KEY" > file.jsonl23 -H "Authorization: Bearer $OPENAI_API_KEY" > file.jsonl

Details

151 151 

152### Example152### Example

153 153 

154```http

155curl https://api.openai.com/v1/files \

156 -H 'Content-Type: multipart/form-data' \

157 -H "Authorization: Bearer $OPENAI_API_KEY" \

158 -F 'file=@/path/to/file' \

159 -F purpose=assistants

160```

161 

162#### 200 — Example

163 

164```json

165{

166 "id": "id",

167 "bytes": 0,

168 "created_at": 0,

169 "filename": "filename",

170 "object": "file",

171 "purpose": "assistants",

172 "status": "uploaded",

173 "expires_at": 0,

174 "status_details": "status_details"

175}

176```

177 

178### Example

179 

180```http154```http

181curl https://api.openai.com/v1/files \155curl https://api.openai.com/v1/files \

182 -H "Authorization: Bearer $OPENAI_API_KEY" \156 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/files/$FILE_ID \

31 -X DELETE \

32 -H "Authorization: Bearer $OPENAI_API_KEY"

33```

34 

35#### 200 — Example

36 

37```json

38{

39 "id": "id",

40 "deleted": true,

41 "object": "file"

42}

43```

44 

45### Example

46 

47```http29```http

48curl https://api.openai.com/v1/files/file-abc123 \30curl https://api.openai.com/v1/files/file-abc123 \

49 -X DELETE \31 -X DELETE \

Details

113 -H "Authorization: Bearer $OPENAI_API_KEY"113 -H "Authorization: Bearer $OPENAI_API_KEY"

114```114```

115 115 

116#### 200 — Example

117 

118```json

119{

120 "data": [

121 {

122 "id": "id",

123 "bytes": 0,

124 "created_at": 0,

125 "filename": "filename",

126 "object": "file",

127 "purpose": "assistants",

128 "status": "uploaded",

129 "expires_at": 0,

130 "status_details": "status_details"

131 }

132 ],

133 "first_id": "file-abc123",

134 "has_more": false,

135 "last_id": "file-abc456",

136 "object": "list"

137}

138```

139 

140### Example

141 

142```http

143curl https://api.openai.com/v1/files \

144 -H "Authorization: Bearer $OPENAI_API_KEY"

145```

146 

147#### Response example116#### Response example

148 117 

149```json118```json

Details

86 86 

87### Example87### Example

88 88 

89```http

90curl https://api.openai.com/v1/files/$FILE_ID \

91 -H "Authorization: Bearer $OPENAI_API_KEY"

92```

93 

94#### 200 — Example

95 

96```json

97{

98 "id": "id",

99 "bytes": 0,

100 "created_at": 0,

101 "filename": "filename",

102 "object": "file",

103 "purpose": "assistants",

104 "status": "uploaded",

105 "expires_at": 0,

106 "status_details": "status_details"

107}

108```

109 

110### Example

111 

112```http89```http

113curl https://api.openai.com/v1/files/file-abc123 \90curl https://api.openai.com/v1/files/file-abc123 \

114 -H "Authorization: Bearer $OPENAI_API_KEY"91 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

705 ]705 ]

706 }706 }

707 ],707 ],

708 "model": "gpt-5-mini",708 "model": "gpt-4.1-mini-2025-04-14",

709 "sampling_params": {709 "sampling_params": {

710 "temperature": 0.2710 "temperature": 0.2

711 }711 }


738 ]738 ]

739 }739 }

740 ],740 ],

741 "model": "gpt-5-mini",741 "model": "gpt-4.1-mini-2025-04-14",

742 "sampling_params": {742 "sampling_params": {

743 "temperature": 1,743 "temperature": 1,

744 "top_p": 1,744 "top_p": 1,


784 "completion_tokens": 134,784 "completion_tokens": 134,

785 "cached_tokens": 0785 "cached_tokens": 0

786 },786 },

787 "sampled_model_name": "gpt-5-mini"787 "sampled_model_name": "gpt-4.1-mini-2025-04-14"

788 },788 },

789 "sub_rewards": {},789 "sub_rewards": {},

790 "model_grader_token_usage_per_model": {790 "model_grader_token_usage_per_model": {

791 "gpt-5-mini": {791 "gpt-4.1-mini-2025-04-14": {

792 "prompt_tokens": 190,792 "prompt_tokens": 190,

793 "total_tokens": 324,793 "total_tokens": 324,

794 "completion_tokens": 134,794 "completion_tokens": 134,

Details

994 994 

995### Example995### Example

996 996 

997```http

998curl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \

999 -H 'Content-Type: application/json' \

1000 -H "Authorization: Bearer $OPENAI_API_KEY" \

1001 -d '{

1002 "grader": {

1003 "input": "input",

1004 "name": "name",

1005 "operation": "eq",

1006 "reference": "reference",

1007 "type": "string_check"

1008 }

1009 }'

1010```

1011 

1012#### 200 — Example

1013 

1014```json

1015{

1016 "grader": {

1017 "input": "input",

1018 "name": "name",

1019 "operation": "eq",

1020 "reference": "reference",

1021 "type": "string_check"

1022 }

1023}

1024```

1025 

1026### Example

1027 

1028```http997```http

1029curl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \998curl https://api.openai.com/v1/fine_tuning/alpha/graders/validate \

1030 -H "Authorization: Bearer $OPENAI_API_KEY" \999 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

59### Example59### Example

60 60 

61```http61```http

62curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions \62curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd/permissions \

63 -H 'Content-Type: application/json' \

64 -H "Authorization: Bearer $OPENAI_API_KEY" \

65 -d '{

66 "project_ids": [

67 "string"

68 ]

69 }'

70```

71 

72#### 200 — Example

73 

74```json

75{

76 "data": [

77 {

78 "id": "id",

79 "created_at": 0,

80 "object": "checkpoint.permission",

81 "project_id": "project_id"

82 }

83 ],

84 "has_more": true,

85 "object": "list",

86 "first_id": "first_id",

87 "last_id": "last_id"

88}

89```

90 

91### Example

92 

93```http

94curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \

95 -H "Authorization: Bearer $OPENAI_API_KEY"63 -H "Authorization: Bearer $OPENAI_API_KEY"

96 -d '{"project_ids": ["proj_abGMw1llN8IrBb6SvvY5A1iH"]}'64 -d '{"project_ids": ["proj_abGMw1llN8IrBb6SvvY5A1iH"]}'

97```65```

Details

37### Example37### Example

38 38 

39```http39```http

40curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions/$PERMISSION_ID \40curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \

41 -X DELETE \

42 -H "Authorization: Bearer $OPENAI_API_KEY"

43```

44 

45#### 200 — Example

46 

47```json

48{

49 "id": "id",

50 "deleted": true,

51 "object": "checkpoint.permission"

52}

53```

54 

55### Example

56 

57```http

58curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions/cp_zc4Q7MP6XxulcVzj4MZdwsAB \

59 -H "Authorization: Bearer $OPENAI_API_KEY"41 -H "Authorization: Bearer $OPENAI_API_KEY"

60```42```

61 43 

Details

73### Example73### Example

74 74 

75```http75```http

76curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions \76curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd/permissions \

77 -H "Authorization: Bearer $OPENAI_API_KEY"

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "data": [

85 {

86 "id": "id",

87 "created_at": 0,

88 "object": "checkpoint.permission",

89 "project_id": "project_id"

90 }

91 ],

92 "has_more": true,

93 "object": "list",

94 "first_id": "first_id",

95 "last_id": "last_id"

96}

97```

98 

99### Example

100 

101```http

102curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \

103 -H "Authorization: Bearer $OPENAI_API_KEY"77 -H "Authorization: Bearer $OPENAI_API_KEY"

104```78```

105 79 

Details

73### Example73### Example

74 74 

75```http75```http

76curl https://api.openai.com/v1/fine_tuning/checkpoints/$FINE_TUNED_MODEL_CHECKPOINT/permissions \76curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4.1-mini-2025-04-14:org:weather:B7R9VjQd/permissions \

77 -H "Authorization: Bearer $OPENAI_API_KEY"

78```

79 

80#### 200 — Example

81 

82```json

83{

84 "data": [

85 {

86 "id": "id",

87 "created_at": 0,

88 "object": "checkpoint.permission",

89 "project_id": "project_id"

90 }

91 ],

92 "has_more": true,

93 "object": "list",

94 "first_id": "first_id",

95 "last_id": "last_id"

96}

97```

98 

99### Example

100 

101```http

102curl https://api.openai.com/v1/fine_tuning/checkpoints/ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd/permissions \

103 -H "Authorization: Bearer $OPENAI_API_KEY"77 -H "Authorization: Bearer $OPENAI_API_KEY"

104```78```

105 79 

Details

906 906 

907### Example907### Example

908 908 

909```http

910curl https://api.openai.com/v1/fine_tuning/jobs/$FINE_TUNING_JOB_ID/cancel \

911 -X POST \

912 -H "Authorization: Bearer $OPENAI_API_KEY"

913```

914 

915#### 200 — Example

916 

917```json

918{

919 "id": "id",

920 "created_at": 0,

921 "error": {

922 "code": "code",

923 "message": "message",

924 "param": "param"

925 },

926 "fine_tuned_model": "fine_tuned_model",

927 "finished_at": 0,

928 "model": "model",

929 "object": "fine_tuning.job",

930 "organization_id": "organization_id",

931 "result_files": [

932 "file-abc123"

933 ],

934 "seed": 0,

935 "status": "validating_files",

936 "trained_tokens": 0,

937 "training_file": "training_file",

938 "validation_file": "validation_file",

939 "estimated_finish": 0,

940 "hyperparameters": {

941 "batch_size": "auto",

942 "learning_rate_multiplier": "auto",

943 "n_epochs": "auto"

944 },

945 "integrations": [

946 {

947 "type": "wandb",

948 "wandb": {

949 "project": "my-wandb-project",

950 "entity": "entity",

951 "name": "name",

952 "tags": [

953 "custom-tag"

954 ]

955 }

956 }

957 ],

958 "metadata": {

959 "foo": "string"

960 },

961 "method": {

962 "type": "supervised",

963 "dpo": {

964 "hyperparameters": {

965 "batch_size": "auto",

966 "beta": "auto",

967 "learning_rate_multiplier": "auto",

968 "n_epochs": "auto"

969 }

970 },

971 "reinforcement": {

972 "grader": {

973 "input": "input",

974 "name": "name",

975 "operation": "eq",

976 "reference": "reference",

977 "type": "string_check"

978 },

979 "hyperparameters": {

980 "batch_size": "auto",

981 "compute_multiplier": "auto",

982 "eval_interval": "auto",

983 "eval_samples": "auto",

984 "learning_rate_multiplier": "auto",

985 "n_epochs": "auto",

986 "reasoning_effort": "default"

987 }

988 },

989 "supervised": {

990 "hyperparameters": {

991 "batch_size": "auto",

992 "learning_rate_multiplier": "auto",

993 "n_epochs": "auto"

994 }

995 }

996 }

997}

998```

999 

1000### Example

1001 

1002```http909```http

1003curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \910curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \

1004 -H "Authorization: Bearer $OPENAI_API_KEY"911 -H "Authorization: Bearer $OPENAI_API_KEY"


1010{917{

1011 "object": "fine_tuning.job",918 "object": "fine_tuning.job",

1012 "id": "ftjob-abc123",919 "id": "ftjob-abc123",

1013 "model": "gpt-4o-mini-2024-07-18",920 "model": "gpt-4.1-mini-2025-04-14",

1014 "created_at": 1721764800,921 "created_at": 1721764800,

1015 "fine_tuned_model": null,922 "fine_tuned_model": null,

1016 "organization_id": "org-123",923 "organization_id": "org-123",

Details

14 14 

15Content type: `application/json`15Content type: `application/json`

16 16 

17- `model: string or "babbage-002" or "davinci-002" or "gpt-3.5-turbo" or "gpt-4o-mini"`17- `model: string or "gpt-4.1-mini-2025-04-14" or "babbage-002" or "davinci-002" or 2 more`

18 18 

19 The name of the model to fine-tune. You can select one of the19 The name of the model to fine-tune. You can select one of the

20 [supported models](/api/docs/guides/model-optimization#fine-tuning-methods).20 [supported models](/api/docs/guides/model-optimization#fine-tuning-methods).

21 21 

22 - `string`22 - `string`

23 23 

24 - `"babbage-002" or "davinci-002" or "gpt-3.5-turbo" or "gpt-4o-mini"`24 - `"gpt-4.1-mini-2025-04-14" or "babbage-002" or "davinci-002" or 2 more`

25 25 

26 The name of the model to fine-tune. You can select one of the26 The name of the model to fine-tune. You can select one of the

27 [supported models](/api/docs/guides/model-optimization#fine-tuning-methods).27 [supported models](/api/docs/guides/model-optimization#fine-tuning-methods).

28 28 

29 - `"gpt-4.1-mini-2025-04-14"`

30 

29 - `"babbage-002"`31 - `"babbage-002"`

30 32 

31 - `"davinci-002"`33 - `"davinci-002"`


840 842 

841 A string of up to 64 characters that will be added to your fine-tuned model name.843 A string of up to 64 characters that will be added to your fine-tuned model name.

842 844 

843 For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.845 For example, a `suffix` of "custom-model-name" would produce a model name like `ft:gpt-4.1-mini-2025-04-14:openai:custom-model-name:7p4lURel`.

844 846 

845 `minLength: 1`, `maxLength: 64`847 `minLength: 1`, `maxLength: 64`

846 848 


1749 1751 

1750 `minimum: 1`, `maximum: 50`1752 `minimum: 1`, `maximum: 50`

1751 1753 

1752### Example

1753 

1754```http

1755curl https://api.openai.com/v1/fine_tuning/jobs \

1756 -H 'Content-Type: application/json' \

1757 -H "Authorization: Bearer $OPENAI_API_KEY" \

1758 -d '{

1759 "model": "gpt-4o-mini",

1760 "training_file": "file-abc123",

1761 "seed": 42,

1762 "validation_file": "file-abc123"

1763 }'

1764```

1765 

1766#### 200 — Example

1767 

1768```json

1769{

1770 "id": "id",

1771 "created_at": 0,

1772 "error": {

1773 "code": "code",

1774 "message": "message",

1775 "param": "param"

1776 },

1777 "fine_tuned_model": "fine_tuned_model",

1778 "finished_at": 0,

1779 "model": "model",

1780 "object": "fine_tuning.job",

1781 "organization_id": "organization_id",

1782 "result_files": [

1783 "file-abc123"

1784 ],

1785 "seed": 0,

1786 "status": "validating_files",

1787 "trained_tokens": 0,

1788 "training_file": "training_file",

1789 "validation_file": "validation_file",

1790 "estimated_finish": 0,

1791 "hyperparameters": {

1792 "batch_size": "auto",

1793 "learning_rate_multiplier": "auto",

1794 "n_epochs": "auto"

1795 },

1796 "integrations": [

1797 {

1798 "type": "wandb",

1799 "wandb": {

1800 "project": "my-wandb-project",

1801 "entity": "entity",

1802 "name": "name",

1803 "tags": [

1804 "custom-tag"

1805 ]

1806 }

1807 }

1808 ],

1809 "metadata": {

1810 "foo": "string"

1811 },

1812 "method": {

1813 "type": "supervised",

1814 "dpo": {

1815 "hyperparameters": {

1816 "batch_size": "auto",

1817 "beta": "auto",

1818 "learning_rate_multiplier": "auto",

1819 "n_epochs": "auto"

1820 }

1821 },

1822 "reinforcement": {

1823 "grader": {

1824 "input": "input",

1825 "name": "name",

1826 "operation": "eq",

1827 "reference": "reference",

1828 "type": "string_check"

1829 },

1830 "hyperparameters": {

1831 "batch_size": "auto",

1832 "compute_multiplier": "auto",

1833 "eval_interval": "auto",

1834 "eval_samples": "auto",

1835 "learning_rate_multiplier": "auto",

1836 "n_epochs": "auto",

1837 "reasoning_effort": "default"

1838 }

1839 },

1840 "supervised": {

1841 "hyperparameters": {

1842 "batch_size": "auto",

1843 "learning_rate_multiplier": "auto",

1844 "n_epochs": "auto"

1845 }

1846 }

1847 }

1848}

1849```

1850 

1851### DPO1754### DPO

1852 1755 

1853```http1756```http


1857 -d '{1760 -d '{

1858 "training_file": "file-abc123",1761 "training_file": "file-abc123",

1859 "validation_file": "file-abc123",1762 "validation_file": "file-abc123",

1860 "model": "gpt-4o-mini",1763 "model": "gpt-4.1-mini-2025-04-14",

1861 "method": {1764 "method": {

1862 "type": "dpo",1765 "type": "dpo",

1863 "dpo": {1766 "dpo": {


1875{1778{

1876 "object": "fine_tuning.job",1779 "object": "fine_tuning.job",

1877 "id": "ftjob-abc",1780 "id": "ftjob-abc",

1878 "model": "gpt-4o-mini",1781 "model": "gpt-4.1-mini-2025-04-14",

1879 "created_at": 1746130590,1782 "created_at": 1746130590,

1880 "fine_tuned_model": null,1783 "fine_tuned_model": null,

1881 "organization_id": "org-abc",1784 "organization_id": "org-abc",


1915 -H "Authorization: Bearer $OPENAI_API_KEY" \1818 -H "Authorization: Bearer $OPENAI_API_KEY" \

1916 -d '{1819 -d '{

1917 "training_file": "file-BK7bzQj3FfZFXr7DbL6xJwfo",1820 "training_file": "file-BK7bzQj3FfZFXr7DbL6xJwfo",

1918 "model": "gpt-4o-mini"1821 "model": "gpt-4.1-mini-2025-04-14"

1919 }'1822 }'

1920```1823```

1921 1824 


1925{1828{

1926 "object": "fine_tuning.job",1829 "object": "fine_tuning.job",

1927 "id": "ftjob-abc123",1830 "id": "ftjob-abc123",

1928 "model": "gpt-4o-mini-2024-07-18",1831 "model": "gpt-4.1-mini-2025-04-14",

1929 "created_at": 1721764800,1832 "created_at": 1721764800,

1930 "fine_tuned_model": null,1833 "fine_tuned_model": null,

1931 "organization_id": "org-123",1834 "organization_id": "org-123",


1964 -H "Authorization: Bearer $OPENAI_API_KEY" \1867 -H "Authorization: Bearer $OPENAI_API_KEY" \

1965 -d '{1868 -d '{

1966 "training_file": "file-abc123",1869 "training_file": "file-abc123",

1967 "model": "gpt-4o-mini",1870 "model": "gpt-4.1-mini-2025-04-14",

1968 "method": {1871 "method": {

1969 "type": "supervised",1872 "type": "supervised",

1970 "supervised": {1873 "supervised": {


1982{1885{

1983 "object": "fine_tuning.job",1886 "object": "fine_tuning.job",

1984 "id": "ftjob-abc123",1887 "id": "ftjob-abc123",

1985 "model": "gpt-4o-mini",1888 "model": "gpt-4.1-mini-2025-04-14",

1986 "created_at": 1721764800,1889 "created_at": 1721764800,

1987 "fine_tuned_model": null,1890 "fine_tuned_model": null,

1988 "organization_id": "org-123",1891 "organization_id": "org-123",


2018}1921}

2019```1922```

2020 1923 

2021### Reinforcement1924### Reinforcement (historical)

2022 1925 

2023```http1926```http

2024curl https://api.openai.com/v1/fine_tuning/jobs \1927curl https://api.openai.com/v1/fine_tuning/jobs \


2105 -d '{2007 -d '{

2106 "training_file": "file-abc123",2008 "training_file": "file-abc123",

2107 "validation_file": "file-abc123",2009 "validation_file": "file-abc123",

2108 "model": "gpt-4o-mini"2010 "model": "gpt-4.1-mini-2025-04-14"

2109 }'2011 }'

2110```2012```

2111 2013 


2115{2017{

2116 "object": "fine_tuning.job",2018 "object": "fine_tuning.job",

2117 "id": "ftjob-abc123",2019 "id": "ftjob-abc123",

2118 "model": "gpt-4o-mini-2024-07-18",2020 "model": "gpt-4.1-mini-2025-04-14",

2119 "created_at": 1721764800,2021 "created_at": 1721764800,

2120 "fine_tuned_model": null,2022 "fine_tuned_model": null,

2121 "organization_id": "org-123",2023 "organization_id": "org-123",


2155 -d '{2057 -d '{

2156 "training_file": "file-abc123",2058 "training_file": "file-abc123",

2157 "validation_file": "file-abc123",2059 "validation_file": "file-abc123",

2158 "model": "gpt-4o-mini",2060 "model": "gpt-4.1-mini-2025-04-14",

2159 "integrations": [2061 "integrations": [

2160 {2062 {

2161 "type": "wandb",2063 "type": "wandb",


2177{2079{

2178 "object": "fine_tuning.job",2080 "object": "fine_tuning.job",

2179 "id": "ftjob-abc123",2081 "id": "ftjob-abc123",

2180 "model": "gpt-4o-mini-2024-07-18",2082 "model": "gpt-4.1-mini-2025-04-14",

2181 "created_at": 1721764800,2083 "created_at": 1721764800,

2182 "fine_tuned_model": null,2084 "fine_tuned_model": null,

2183 "organization_id": "org-123",2085 "organization_id": "org-123",

Details

919 919 

920### Example920### Example

921 921 

922```http

923curl https://api.openai.com/v1/fine_tuning/jobs \

924 -H "Authorization: Bearer $OPENAI_API_KEY"

925```

926 

927#### 200 — Example

928 

929```json

930{

931 "data": [

932 {

933 "id": "id",

934 "created_at": 0,

935 "error": {

936 "code": "code",

937 "message": "message",

938 "param": "param"

939 },

940 "fine_tuned_model": "fine_tuned_model",

941 "finished_at": 0,

942 "model": "model",

943 "object": "fine_tuning.job",

944 "organization_id": "organization_id",

945 "result_files": [

946 "file-abc123"

947 ],

948 "seed": 0,

949 "status": "validating_files",

950 "trained_tokens": 0,

951 "training_file": "training_file",

952 "validation_file": "validation_file",

953 "estimated_finish": 0,

954 "hyperparameters": {

955 "batch_size": "auto",

956 "learning_rate_multiplier": "auto",

957 "n_epochs": "auto"

958 },

959 "integrations": [

960 {

961 "type": "wandb",

962 "wandb": {

963 "project": "my-wandb-project",

964 "entity": "entity",

965 "name": "name",

966 "tags": [

967 "custom-tag"

968 ]

969 }

970 }

971 ],

972 "metadata": {

973 "foo": "string"

974 },

975 "method": {

976 "type": "supervised",

977 "dpo": {

978 "hyperparameters": {

979 "batch_size": "auto",

980 "beta": "auto",

981 "learning_rate_multiplier": "auto",

982 "n_epochs": "auto"

983 }

984 },

985 "reinforcement": {

986 "grader": {

987 "input": "input",

988 "name": "name",

989 "operation": "eq",

990 "reference": "reference",

991 "type": "string_check"

992 },

993 "hyperparameters": {

994 "batch_size": "auto",

995 "compute_multiplier": "auto",

996 "eval_interval": "auto",

997 "eval_samples": "auto",

998 "learning_rate_multiplier": "auto",

999 "n_epochs": "auto",

1000 "reasoning_effort": "default"

1001 }

1002 },

1003 "supervised": {

1004 "hyperparameters": {

1005 "batch_size": "auto",

1006 "learning_rate_multiplier": "auto",

1007 "n_epochs": "auto"

1008 }

1009 }

1010 }

1011 }

1012 ],

1013 "has_more": true,

1014 "object": "list"

1015}

1016```

1017 

1018### Example

1019 

1020```http922```http

1021curl "https://api.openai.com/v1/fine_tuning/jobs?limit=2&metadata[key]=value" \923curl "https://api.openai.com/v1/fine_tuning/jobs?limit=2&metadata[key]=value" \

1022 -H "Authorization: Bearer $OPENAI_API_KEY"924 -H "Authorization: Bearer $OPENAI_API_KEY"


1031 {933 {

1032 "object": "fine_tuning.job",934 "object": "fine_tuning.job",

1033 "id": "ftjob-abc123",935 "id": "ftjob-abc123",

1034 "model": "gpt-4o-mini-2024-07-18",936 "model": "gpt-4.1-mini-2025-04-14",

1035 "created_at": 1721764800,937 "created_at": 1721764800,

1036 "fine_tuned_model": null,938 "fine_tuned_model": null,

1037 "organization_id": "org-123",939 "organization_id": "org-123",

Details

76 76 

77### Example77### Example

78 78 

79```http

80curl https://api.openai.com/v1/fine_tuning/jobs/$FINE_TUNING_JOB_ID/events \

81 -H "Authorization: Bearer $OPENAI_API_KEY"

82```

83 

84#### 200 — Example

85 

86```json

87{

88 "data": [

89 {

90 "id": "id",

91 "created_at": 0,

92 "level": "info",

93 "message": "message",

94 "object": "fine_tuning.job.event",

95 "data": {},

96 "type": "message"

97 }

98 ],

99 "has_more": true,

100 "object": "list"

101}

102```

103 

104### Example

105 

106```http79```http

107curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/events \80curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/events \

108 -H "Authorization: Bearer $OPENAI_API_KEY"81 -H "Authorization: Bearer $OPENAI_API_KEY"


128 "id": "ft-event-tyiGuB72evQncpH87xe505Sv",101 "id": "ft-event-tyiGuB72evQncpH87xe505Sv",

129 "created_at": 1721764800,102 "created_at": 1721764800,

130 "level": "info",103 "level": "info",

131 "message": "New fine-tuned model created: ft:gpt-4o-mini:openai::7p4lURel",104 "message": "New fine-tuned model created: ft:gpt-4.1-mini-2025-04-14:openai::7p4lURel",

132 "data": null,105 "data": null,

133 "type": "message"106 "type": "message"

134 }107 }

Details

906 906 

907### Example907### Example

908 908 

909```http

910curl https://api.openai.com/v1/fine_tuning/jobs/$FINE_TUNING_JOB_ID/pause \

911 -X POST \

912 -H "Authorization: Bearer $OPENAI_API_KEY"

913```

914 

915#### 200 — Example

916 

917```json

918{

919 "id": "id",

920 "created_at": 0,

921 "error": {

922 "code": "code",

923 "message": "message",

924 "param": "param"

925 },

926 "fine_tuned_model": "fine_tuned_model",

927 "finished_at": 0,

928 "model": "model",

929 "object": "fine_tuning.job",

930 "organization_id": "organization_id",

931 "result_files": [

932 "file-abc123"

933 ],

934 "seed": 0,

935 "status": "validating_files",

936 "trained_tokens": 0,

937 "training_file": "training_file",

938 "validation_file": "validation_file",

939 "estimated_finish": 0,

940 "hyperparameters": {

941 "batch_size": "auto",

942 "learning_rate_multiplier": "auto",

943 "n_epochs": "auto"

944 },

945 "integrations": [

946 {

947 "type": "wandb",

948 "wandb": {

949 "project": "my-wandb-project",

950 "entity": "entity",

951 "name": "name",

952 "tags": [

953 "custom-tag"

954 ]

955 }

956 }

957 ],

958 "metadata": {

959 "foo": "string"

960 },

961 "method": {

962 "type": "supervised",

963 "dpo": {

964 "hyperparameters": {

965 "batch_size": "auto",

966 "beta": "auto",

967 "learning_rate_multiplier": "auto",

968 "n_epochs": "auto"

969 }

970 },

971 "reinforcement": {

972 "grader": {

973 "input": "input",

974 "name": "name",

975 "operation": "eq",

976 "reference": "reference",

977 "type": "string_check"

978 },

979 "hyperparameters": {

980 "batch_size": "auto",

981 "compute_multiplier": "auto",

982 "eval_interval": "auto",

983 "eval_samples": "auto",

984 "learning_rate_multiplier": "auto",

985 "n_epochs": "auto",

986 "reasoning_effort": "default"

987 }

988 },

989 "supervised": {

990 "hyperparameters": {

991 "batch_size": "auto",

992 "learning_rate_multiplier": "auto",

993 "n_epochs": "auto"

994 }

995 }

996 }

997}

998```

999 

1000### Example

1001 

1002```http909```http

1003curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/pause \910curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/pause \

1004 -H "Authorization: Bearer $OPENAI_API_KEY"911 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

906 906 

907### Example907### Example

908 908 

909```http

910curl https://api.openai.com/v1/fine_tuning/jobs/$FINE_TUNING_JOB_ID/resume \

911 -X POST \

912 -H "Authorization: Bearer $OPENAI_API_KEY"

913```

914 

915#### 200 — Example

916 

917```json

918{

919 "id": "id",

920 "created_at": 0,

921 "error": {

922 "code": "code",

923 "message": "message",

924 "param": "param"

925 },

926 "fine_tuned_model": "fine_tuned_model",

927 "finished_at": 0,

928 "model": "model",

929 "object": "fine_tuning.job",

930 "organization_id": "organization_id",

931 "result_files": [

932 "file-abc123"

933 ],

934 "seed": 0,

935 "status": "validating_files",

936 "trained_tokens": 0,

937 "training_file": "training_file",

938 "validation_file": "validation_file",

939 "estimated_finish": 0,

940 "hyperparameters": {

941 "batch_size": "auto",

942 "learning_rate_multiplier": "auto",

943 "n_epochs": "auto"

944 },

945 "integrations": [

946 {

947 "type": "wandb",

948 "wandb": {

949 "project": "my-wandb-project",

950 "entity": "entity",

951 "name": "name",

952 "tags": [

953 "custom-tag"

954 ]

955 }

956 }

957 ],

958 "metadata": {

959 "foo": "string"

960 },

961 "method": {

962 "type": "supervised",

963 "dpo": {

964 "hyperparameters": {

965 "batch_size": "auto",

966 "beta": "auto",

967 "learning_rate_multiplier": "auto",

968 "n_epochs": "auto"

969 }

970 },

971 "reinforcement": {

972 "grader": {

973 "input": "input",

974 "name": "name",

975 "operation": "eq",

976 "reference": "reference",

977 "type": "string_check"

978 },

979 "hyperparameters": {

980 "batch_size": "auto",

981 "compute_multiplier": "auto",

982 "eval_interval": "auto",

983 "eval_samples": "auto",

984 "learning_rate_multiplier": "auto",

985 "n_epochs": "auto",

986 "reasoning_effort": "default"

987 }

988 },

989 "supervised": {

990 "hyperparameters": {

991 "batch_size": "auto",

992 "learning_rate_multiplier": "auto",

993 "n_epochs": "auto"

994 }

995 }

996 }

997}

998```

999 

1000### Example

1001 

1002```http909```http

1003curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/resume \910curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/resume \

1004 -H "Authorization: Bearer $OPENAI_API_KEY"911 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

908 908 

909### Example909### Example

910 910 

911```http

912curl https://api.openai.com/v1/fine_tuning/jobs/$FINE_TUNING_JOB_ID \

913 -H "Authorization: Bearer $OPENAI_API_KEY"

914```

915 

916#### 200 — Example

917 

918```json

919{

920 "id": "id",

921 "created_at": 0,

922 "error": {

923 "code": "code",

924 "message": "message",

925 "param": "param"

926 },

927 "fine_tuned_model": "fine_tuned_model",

928 "finished_at": 0,

929 "model": "model",

930 "object": "fine_tuning.job",

931 "organization_id": "organization_id",

932 "result_files": [

933 "file-abc123"

934 ],

935 "seed": 0,

936 "status": "validating_files",

937 "trained_tokens": 0,

938 "training_file": "training_file",

939 "validation_file": "validation_file",

940 "estimated_finish": 0,

941 "hyperparameters": {

942 "batch_size": "auto",

943 "learning_rate_multiplier": "auto",

944 "n_epochs": "auto"

945 },

946 "integrations": [

947 {

948 "type": "wandb",

949 "wandb": {

950 "project": "my-wandb-project",

951 "entity": "entity",

952 "name": "name",

953 "tags": [

954 "custom-tag"

955 ]

956 }

957 }

958 ],

959 "metadata": {

960 "foo": "string"

961 },

962 "method": {

963 "type": "supervised",

964 "dpo": {

965 "hyperparameters": {

966 "batch_size": "auto",

967 "beta": "auto",

968 "learning_rate_multiplier": "auto",

969 "n_epochs": "auto"

970 }

971 },

972 "reinforcement": {

973 "grader": {

974 "input": "input",

975 "name": "name",

976 "operation": "eq",

977 "reference": "reference",

978 "type": "string_check"

979 },

980 "hyperparameters": {

981 "batch_size": "auto",

982 "compute_multiplier": "auto",

983 "eval_interval": "auto",

984 "eval_samples": "auto",

985 "learning_rate_multiplier": "auto",

986 "n_epochs": "auto",

987 "reasoning_effort": "default"

988 }

989 },

990 "supervised": {

991 "hyperparameters": {

992 "batch_size": "auto",

993 "learning_rate_multiplier": "auto",

994 "n_epochs": "auto"

995 }

996 }

997 }

998}

999```

1000 

1001### Example

1002 

1003```http911```http

1004curl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \912curl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \

1005 -H "Authorization: Bearer $OPENAI_API_KEY"913 -H "Authorization: Bearer $OPENAI_API_KEY"


1011{919{

1012 "object": "fine_tuning.job",920 "object": "fine_tuning.job",

1013 "id": "ftjob-abc123",921 "id": "ftjob-abc123",

1014 "model": "davinci-002",922 "model": "gpt-4.1-mini-2025-04-14",

1015 "created_at": 1692661014,923 "created_at": 1762778750,

1016 "finished_at": 1692661190,924 "finished_at": 1762778926,

1017 "fine_tuned_model": "ft:davinci-002:my-org:custom_suffix:7q8mpxmy",925 "fine_tuned_model": "ft:gpt-4.1-mini-2025-04-14:my-org:custom_suffix:7q8mpxmy",

1018 "organization_id": "org-123",926 "organization_id": "org-123",

1019 "result_files": [927 "result_files": [

1020 "file-abc123"928 "file-abc123"

Details

84 84 

85### Example85### Example

86 86 

87```http

88curl https://api.openai.com/v1/fine_tuning/jobs/$FINE_TUNING_JOB_ID/checkpoints \

89 -H "Authorization: Bearer $OPENAI_API_KEY"

90```

91 

92#### 200 — Example

93 

94```json

95{

96 "data": [

97 {

98 "id": "id",

99 "created_at": 0,

100 "fine_tuned_model_checkpoint": "fine_tuned_model_checkpoint",

101 "fine_tuning_job_id": "fine_tuning_job_id",

102 "metrics": {

103 "full_valid_loss": 0,

104 "full_valid_mean_token_accuracy": 0,

105 "step": 0,

106 "train_loss": 0,

107 "train_mean_token_accuracy": 0,

108 "valid_loss": 0,

109 "valid_mean_token_accuracy": 0

110 },

111 "object": "fine_tuning.job.checkpoint",

112 "step_number": 0

113 }

114 ],

115 "has_more": true,

116 "object": "list",

117 "first_id": "first_id",

118 "last_id": "last_id"

119}

120```

121 

122### Example

123 

124```http87```http

125curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/checkpoints \88curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/checkpoints \

126 -H "Authorization: Bearer $OPENAI_API_KEY"89 -H "Authorization: Bearer $OPENAI_API_KEY"


136 "object": "fine_tuning.job.checkpoint",99 "object": "fine_tuning.job.checkpoint",

137 "id": "ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB",100 "id": "ftckpt_zc4Q7MP6XxulcVzj4MZdwsAB",

138 "created_at": 1721764867,101 "created_at": 1721764867,

139 "fine_tuned_model_checkpoint": "ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:96olL566:ckpt-step-2000",102 "fine_tuned_model_checkpoint": "ft:gpt-4.1-mini-2025-04-14:my-org:custom-suffix:96olL566:ckpt-step-2000",

140 "metrics": {103 "metrics": {

141 "full_valid_loss": 0.134,104 "full_valid_loss": 0.134,

142 "full_valid_mean_token_accuracy": 0.874105 "full_valid_mean_token_accuracy": 0.874


148 "object": "fine_tuning.job.checkpoint",111 "object": "fine_tuning.job.checkpoint",

149 "id": "ftckpt_enQCFmOTGj3syEpYVhBRLTSy",112 "id": "ftckpt_enQCFmOTGj3syEpYVhBRLTSy",

150 "created_at": 1721764800,113 "created_at": 1721764800,

151 "fine_tuned_model_checkpoint": "ft:gpt-4o-mini-2024-07-18:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000",114 "fine_tuned_model_checkpoint": "ft:gpt-4.1-mini-2025-04-14:my-org:custom-suffix:7q8mpxmy:ckpt-step-1000",

152 "metrics": {115 "metrics": {

153 "full_valid_loss": 0.167,116 "full_valid_loss": 0.167,

154 "full_valid_mean_token_accuracy": 0.781117 "full_valid_mean_token_accuracy": 0.781

Details

220 220 

221### Example221### Example

222 222 

223```http

224curl https://api.openai.com/v1/images/variations \

225 -H 'Content-Type: multipart/form-data' \

226 -H "Authorization: Bearer $OPENAI_API_KEY" \

227 -F 'image=@/path/to/image' \

228 -F model=dall-e-2 \

229 -F n=1 \

230 -F response_format=url \

231 -F size=1024x1024 \

232 -F user=user-1234

233```

234 

235#### 200 — Example

236 

237```json

238{

239 "created": 0,

240 "background": "transparent",

241 "data": [

242 {

243 "b64_json": "b64_json",

244 "revised_prompt": "revised_prompt",

245 "url": "https://example.com"

246 }

247 ],

248 "output_format": "png",

249 "quality": "low",

250 "safety_identifier": "safety_identifier",

251 "size": "1024x1024",

252 "svg_usage": {

253 "input_tokens": 0,

254 "model": "model",

255 "output_tokens": 0,

256 "reasoning_tokens": 0,

257 "total_tokens": 0

258 },

259 "usage": {

260 "input_tokens": 0,

261 "input_tokens_details": {

262 "image_tokens": 0,

263 "text_tokens": 0

264 },

265 "output_tokens": 0,

266 "total_tokens": 0,

267 "output_tokens_details": {

268 "image_tokens": 0,

269 "text_tokens": 0

270 }

271 }

272}

273```

274 

275### Example

276 

277```http223```http

278curl https://api.openai.com/v1/images/variations \224curl https://api.openai.com/v1/images/variations \

279 -H "Authorization: Bearer $OPENAI_API_KEY" \225 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

102 102 

103 `maxLength: 20971520`, `format: uri`103 `maxLength: 20971520`, `format: uri`

104 104 

105- `model: optional string or "gpt-image-1.5" or "gpt-image-2" or "gpt-image-2-2026-04-21" or 9 more or null (default: "gpt-image-2.5-sunburst")`105- `model: optional string or "gpt-image-1.5" or "gpt-image-2" or "gpt-image-2-2026-04-21" or 9 more or null (default: "gpt-image-2.6-sunburst")`

106 106 

107 The GPT image model to use for image editing, including `gpt-image-2`, its dated107 The GPT image model to use for image editing, including `gpt-image-2`, its dated

108 snapshot `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,108 snapshot `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,

109 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,109 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,

110 `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`, and `gpt-image-2.6-flare`.110 `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`, and `gpt-image-2.6-flare`.

111 Defaults to `gpt-image-2.5-sunburst`.111 Defaults to `gpt-image-2.6-sunburst`.

112 112 

113 `gpt-image-1` was shut down on October 23, 2026. Use113 `gpt-image-1` was shut down on October 23, 2026. Use

114 `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.114 `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.


121 snapshot `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,121 snapshot `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,

122 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,122 `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,

123 `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`, and `gpt-image-2.6-flare`.123 `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`, and `gpt-image-2.6-flare`.

124 Defaults to `gpt-image-2.5-sunburst`.124 Defaults to `gpt-image-2.6-sunburst`.

125 125 

126 `gpt-image-1` was shut down on October 23, 2026. Use126 `gpt-image-1` was shut down on October 23, 2026. Use

127 `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.127 `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.


428 }428 }

429 ],429 ],

430 "prompt": "Add a watercolor effect to this image",430 "prompt": "Add a watercolor effect to this image",

431 "model": "gpt-image-1.5",431 "model": "gpt-image-2.6-flare",

432 "quality": "high",432 "quality": "high",

433 "size": "1024x1024"433 "size": "1024x1024"

434 }'434 }'


481 -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \481 -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png) \

482 -X POST "https://api.openai.com/v1/images/edits" \482 -X POST "https://api.openai.com/v1/images/edits" \

483 -H "Authorization: Bearer $OPENAI_API_KEY" \483 -H "Authorization: Bearer $OPENAI_API_KEY" \

484 -F "model=gpt-image-1.5" \484 -F "model=gpt-image-2.6-flare" \

485 -F "image[]=@body-lotion.png" \485 -F "image[]=@body-lotion.png" \

486 -F "image[]=@bath-bomb.png" \486 -F "image[]=@bath-bomb.png" \

487 -F "image[]=@incense-kit.png" \487 -F "image[]=@incense-kit.png" \


502 }502 }

503 ],503 ],

504 "prompt": "Add a watercolor effect to this image",504 "prompt": "Add a watercolor effect to this image",

505 "model": "gpt-image-1.5",505 "model": "gpt-image-2.6-flare",

506 "quality": "high",506 "quality": "high",

507 "size": "1024x1024"507 "size": "1024x1024"

508 }'508 }'


524 "mask": {524 "mask": {

525 "file_id": "file-mask123"525 "file_id": "file-mask123"

526 },526 },

527 "model": "gpt-image-1.5",527 "model": "gpt-image-2.6-flare",

528 "output_compression": 100,

529 "output_format": "png"528 "output_format": "png"

530 }'529 }'

531```530```


535```http534```http

536curl -s -N -X POST "https://api.openai.com/v1/images/edits" \535curl -s -N -X POST "https://api.openai.com/v1/images/edits" \

537 -H "Authorization: Bearer $OPENAI_API_KEY" \536 -H "Authorization: Bearer $OPENAI_API_KEY" \

538 -F "model=gpt-image-1.5" \537 -F "model=gpt-image-2.6-flare" \

539 -F "image[]=@body-lotion.png" \538 -F "image[]=@body-lotion.png" \

540 -F "image[]=@bath-bomb.png" \539 -F "image[]=@bath-bomb.png" \

541 -F "image[]=@incense-kit.png" \540 -F "image[]=@incense-kit.png" \

Details

405 -H 'Content-Type: application/json' \405 -H 'Content-Type: application/json' \

406 -H "Authorization: Bearer $OPENAI_API_KEY" \406 -H "Authorization: Bearer $OPENAI_API_KEY" \

407 -d '{407 -d '{

408 "model": "gpt-image-2.5-flare",408 "model": "gpt-image-2.6-flare",

409 "prompt": "A cute baby sea otter",409 "prompt": "A cute baby sea otter"

410 "background": "transparent",

411 "moderation": "low",

412 "n": 1,

413 "output_compression": 100,

414 "output_format": "png",

415 "partial_images": 1,

416 "quality": "medium",

417 "safety_identifier": "user-1234",

418 "size": "1024x1024",

419 "style": "vivid",

420 "user": "user-1234"

421 }'410 }'

422```411```

423 412 


468 -H "Content-Type: application/json" \457 -H "Content-Type: application/json" \

469 -H "Authorization: Bearer $OPENAI_API_KEY" \458 -H "Authorization: Bearer $OPENAI_API_KEY" \

470 -d '{459 -d '{

471 "model": "gpt-image-2.5-flare",460 "model": "gpt-image-2.6-flare",

472 "prompt": "A cute baby sea otter",461 "prompt": "A cute baby sea otter",

473 "n": 1,462 "n": 1,

474 "size": "1024x1024"463 "size": "1024x1024"


504 -H "Content-Type: application/json" \493 -H "Content-Type: application/json" \

505 -H "Authorization: Bearer $OPENAI_API_KEY" \494 -H "Authorization: Bearer $OPENAI_API_KEY" \

506 -d '{495 -d '{

507 "model": "gpt-image-2.5-flare",496 "model": "gpt-image-2.6-flare",

508 "prompt": "A cute baby sea otter",497 "prompt": "A cute baby sea otter",

509 "n": 1,498 "n": 1,

510 "size": "1024x1024",499 "size": "1024x1024",

Details

44 "session": {44 "session": {

45 "id": "live_fork_123",45 "id": "live_fork_123",

46 "expires_at": 1788307200,46 "expires_at": 1788307200,

47 "status": "active",47 "status": "active"

48 "model": "gpt-live-1"

49 }48 }

50}49}

51```50```


7801 7800 

7802 The Unix timestamp, in seconds, at which the Live session expires.7801 The Unix timestamp, in seconds, at which the Live session expires.

7803 7802 

7804 - `model: string or "gpt-live-1"`7803 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

7805 7804 

7806 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.7805 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

7807 7806 


7809 7808 

7810 `minLength: 1`7809 `minLength: 1`

7811 7810 

7812 - `"gpt-live-1"`7811 - `"gpt-live-1" or "gpt-live-1.1"`

7813 7812 

7814 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.7813 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

7815 7814 

7816 - `"gpt-live-1"`7815 - `"gpt-live-1"`

7817 7816 

7817 - `"gpt-live-1.1"`

7818 

7818 - `status: "active" (default: "active")`7819 - `status: "active" (default: "active")`

7819 7820 

7820 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.7821 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


9208 "client_event_id": "evt_start_001",9209 "client_event_id": "evt_start_001",

9209 "session": {9210 "session": {

9210 "id": "live_abc123",9211 "id": "live_abc123",

9211 "model": "gpt-live-1",9212 "model": "gpt-live-1.1",

9212 "status": "active",9213 "status": "active",

9213 "expires_at": 1788555600,9214 "expires_at": 1788555600,

9214 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",9215 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


9255 9256 

9256 The Unix timestamp, in seconds, at which the Live session expires.9257 The Unix timestamp, in seconds, at which the Live session expires.

9257 9258 

9258 - `model: string or "gpt-live-1"`9259 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

9259 9260 

9260 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.9261 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

9261 9262 


9263 9264 

9264 `minLength: 1`9265 `minLength: 1`

9265 9266 

9266 - `"gpt-live-1"`9267 - `"gpt-live-1" or "gpt-live-1.1"`

9267 9268 

9268 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.9269 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

9269 9270 

9270 - `"gpt-live-1"`9271 - `"gpt-live-1"`

9271 9272 

9273 - `"gpt-live-1.1"`

9274 

9272 - `status: "active" (default: "active")`9275 - `status: "active" (default: "active")`

9273 9276 

9274 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.9277 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


10662 "client_event_id": "evt_update_001",10665 "client_event_id": "evt_update_001",

10663 "session": {10666 "session": {

10664 "id": "live_def456",10667 "id": "live_def456",

10665 "model": "gpt-live-1",10668 "model": "gpt-live-1.1",

10666 "status": "active",10669 "status": "active",

10667 "expires_at": 1788555600,10670 "expires_at": 1788555600,

10668 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",10671 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


10679 "delegation": {10682 "delegation": {

10680 "type": "responses",10683 "type": "responses",

10681 "responses": {10684 "responses": {

10682 "model": "gpt-6-astra",10685 "model": "gpt-6.2-astra",

10683 "instructions": "Check restaurant availability. Ask before confirming a booking.",10686 "instructions": "Check restaurant availability. Ask before confirming a booking.",

10684 "max_output_tokens": 1024,10687 "max_output_tokens": 1024,

10685 "tools": []10688 "tools": []


11950 11953 

11951 The cumulative Live audio usage so far.11954 The cumulative Live audio usage so far.

11952 11955 

11953 - `seconds: number`11956 - `seconds: integer`

11957 

11958 The cumulative billable duration in whole seconds. When present, the active and paused breakdown adds up to this total.

11959 

11960 - `active_seconds: optional integer`

11961 

11962 The remaining billable seconds attributed to active audio and any unused prepaid duration.

11954 11963 

11955 The cumulative Live audio duration in seconds. Do not sum this value across usage events.11964 - `paused_seconds: optional integer`

11965 

11966 Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.

11956 11967 

11957- `client_event_id: optional string`11968- `client_event_id: optional string`

11958 11969 


11973 "type": "session.usage.updated",11984 "type": "session.usage.updated",

11974 "event_id": "evt_usage_001",11985 "event_id": "evt_usage_001",

11975 "usage": {11986 "usage": {

11976 "seconds": 32.511987 "seconds": 32

11977 },11988 },

11978 "context_window": {11989 "context_window": {

11979 "usage_ratio": 0.1211990 "usage_ratio": 0.12


12025 12036 

12026 The Unix timestamp, in seconds, at which the Live session expires.12037 The Unix timestamp, in seconds, at which the Live session expires.

12027 12038 

12028 - `model: string or "gpt-live-1"`12039 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

12029 12040 

12030 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.12041 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

12031 12042 


12033 12044 

12034 `minLength: 1`12045 `minLength: 1`

12035 12046 

12036 - `"gpt-live-1"`12047 - `"gpt-live-1" or "gpt-live-1.1"`

12037 12048 

12038 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.12049 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

12039 12050 

12040 - `"gpt-live-1"`12051 - `"gpt-live-1"`

12041 12052 

12053 - `"gpt-live-1.1"`

12054 

12042 - `status: "active" (default: "active")`12055 - `status: "active" (default: "active")`

12043 12056 

12044 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.12057 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


13423 13436 

13424 The final cumulative Live audio usage after session finalization.13437 The final cumulative Live audio usage after session finalization.

13425 13438 

13426 - `seconds: number`13439 - `seconds: integer`

13440 

13441 The cumulative billable duration in whole seconds. When present, the active and paused breakdown adds up to this total.

13427 13442 

13428 The cumulative Live audio duration in seconds. Do not sum this value across usage events.13443 - `active_seconds: optional integer`

13444 

13445 The remaining billable seconds attributed to active audio and any unused prepaid duration.

13446 

13447 - `paused_seconds: optional integer`

13448 

13449 Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.

13429 13450 

13430- `client_event_id: optional string`13451- `client_event_id: optional string`

13431 13452 


13441 "reason": "close_requested",13462 "reason": "close_requested",

13442 "session": {13463 "session": {

13443 "id": "live_abc123",13464 "id": "live_abc123",

13444 "model": "gpt-live-1",13465 "model": "gpt-live-1.1",

13445 "status": "active",13466 "status": "active",

13446 "expires_at": 1788555600,13467 "expires_at": 1788555600,

13447 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",13468 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


13460 }13481 }

13461 },13482 },

13462 "usage": {13483 "usage": {

13463 "seconds": 45.813484 "seconds": 45

13464 }13485 }

13465}13486}

13466```13487```


13572}13593}

13573```13594```

13574 13595 

13596<a id="session.resumed"></a>

13597 

13598### session.resumed

13599 

13600Sent when speech wakes inference and it is ready for audio in a Live WebRTC session. This occurs on the first wake and after each later wake. Delivered to the sideband and, when permitted by its event settings, the data channel.

13601 

13602#### Schema

13603 

13604Schema name: `LiveSessionResumed`

13605 

13606- `event_id: string`

13607 

13608 The unique ID of the Live server event.

13609 

13610- `type: "session.resumed" (default: "session.resumed")`

13611 

13612 - `"session.resumed"`

13613 

13614- `client_event_id: optional string`

13615 

13616 The event_id of the client command associated with this server event, when supplied.

13617 

13618#### Example

13619 

13620```json

13621{

13622 "type": "session.resumed",

13623 "event_id": "evt_resumed_001"

13624}

13625```

13626 

13627<a id="session.paused"></a>

13628 

13629### session.paused

13630 

13631Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC connection, sideband, and session ID persist. Delivered to the sideband and, when permitted by its event settings, the data channel.

13632 

13633#### Schema

13634 

13635Schema name: `LiveSessionPaused`

13636 

13637- `event_id: string`

13638 

13639 The unique ID of the Live server event.

13640 

13641- `type: "session.paused" (default: "session.paused")`

13642 

13643 - `"session.paused"`

13644 

13645- `client_event_id: optional string`

13646 

13647 The event_id of the client command associated with this server event, when supplied.

13648 

13649#### Example

13650 

13651```json

13652{

13653 "type": "session.paused",

13654 "event_id": "evt_paused_001"

13655}

13656```

13657 

13575<a id="server-events-session.input_audio.append"></a>13658<a id="server-events-session.input_audio.append"></a>

13576 13659 

13577### session.input_audio.append13660### session.input_audio.append

Details

30 30 

31 Startup configuration for the Live session.31 Startup configuration for the Live session.

32 32 

33 - `model: string or "gpt-live-1"`33 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

34 34 

35 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.35 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

36 36 


38 38 

39 `minLength: 1`39 `minLength: 1`

40 40 

41 - `"gpt-live-1"`41 - `"gpt-live-1" or "gpt-live-1.1"`

42 42 

43 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.43 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

44 44 

45 - `"gpt-live-1"`45 - `"gpt-live-1"`

46 46 

47 - `"gpt-live-1.1"`

48 

47 - `audio: optional object { output }`49 - `audio: optional object { output }`

48 50 

49 Startup audio configuration. WebRTC and SIP negotiate their audio format on the media transport.51 Startup audio configuration. WebRTC and SIP negotiate their audio format on the media transport.


1154 1156 

1155 `minimum: 0`, `maximum: 800`1157 `minimum: 0`, `maximum: 800`

1156 1158 

1159 - `idle_timeout_s: optional integer`

1160 

1161 Whole seconds of inactivity after which a Live WebRTC session with a speech wake policy pauses inference. The connection and conversation history are retained. Omit to keep inference active after the first wake until the session ends.

1162 

1163 `minimum: 5`, `maximum: 60`

1164 

1157 - `input: optional array of InitialItem`1165 - `input: optional array of InitialItem`

1158 1166 

1159 Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and a configured rendered-token limit (8,192 by default).1167 Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and a configured rendered-token limit (8,192 by default).


1356 1364 

1357 - `"decisions"`1365 - `"decisions"`

1358 1366 

1367 - `wake_policy: optional object { type, vad_threshold }`

1368 

1369 Starts inference when microphone speech is detected.

1370 

1371 - `type: "speech" (default: "speech")`

1372 

1373 The wake policy type, always `speech`.

1374 

1375 - `"speech"`

1376 

1377 - `vad_threshold: optional number`

1378 

1379 The speech detection threshold for the first wake and each later wake, from 0 to 1 inclusive. Defaults to 0.5. Higher values require stronger evidence of speech. This setting is independent of active turn detection.

1380 

1359- `transport: Webrtc { sdp, type } or Sip { destination, trunk, type }`1381- `transport: Webrtc { sdp, type } or Sip { destination, trunk, type }`

1360 1382 

1361 WebRTC transport with an SDP offer, or SIP transport with a destination and per-call trunk credentials.1383 WebRTC transport with an SDP offer, or SIP transport with a destination and per-call trunk credentials.


1476 -H "Authorization: Bearer $OPENAI_API_KEY" \1498 -H "Authorization: Bearer $OPENAI_API_KEY" \

1477 -d '{1499 -d '{

1478 "session": {1500 "session": {

1479 "model": "gpt-live-1"1501 "model": "gpt-live-1.1"

1480 },1502 },

1481 "transport": {1503 "transport": {

1482 "sdp": "x",1504 "sdp": "x",


1518curl https://api.openai.com/v1/live/sessions \1540curl https://api.openai.com/v1/live/sessions \

1519 -H "Authorization: Bearer $OPENAI_API_KEY" \1541 -H "Authorization: Bearer $OPENAI_API_KEY" \

1520 -H "Content-Type: application/json" \1542 -H "Content-Type: application/json" \

1521 -d '{"session":{"model":"gpt-live-1","instructions":"Be concise. Ask for clarification when needed."},"transport":{"type":"webrtc","sdp":"<SDP offer>"}}'1543 -d '{"session":{"model":"gpt-live-1.1","instructions":"Be concise. Ask for clarification when needed."},"transport":{"type":"webrtc","sdp":"<SDP offer>"}}'

1522```1544```

1523 1545 

1524#### Response example1546#### Response example


1533# Export SIP_USERNAME and SIP_PASSWORD in your environment first.1555# Export SIP_USERNAME and SIP_PASSWORD in your environment first.

1534jq -n '{1556jq -n '{

1535 "session": {1557 "session": {

1536 "model": "gpt-live-1",1558 "model": "gpt-live-1.1",

1537 "instructions": "Help the user schedule an appointment.",1559 "instructions": "Help the user schedule an appointment.",

1538 "audio": { "output": { "voice": "marin" } },1560 "audio": { "output": { "voice": "marin" } },

1539 "delegation": { "type": "client" }1561 "delegation": { "type": "client" }

Details

25 "type": "session.start",25 "type": "session.start",

26 "event_id": "evt_start_001",26 "event_id": "evt_start_001",

27 "session": {27 "session": {

28 "model": "gpt-live-1",28 "model": "gpt-live-1.1",

29 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",29 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",

30 "audio": {30 "audio": {

31 "format": {31 "format": {


58 "session": {58 "session": {

59 "id": "live_123",59 "id": "live_123",

60 "expires_at": 1788307200,60 "expires_at": 1788307200,

61 "status": "active",61 "status": "active"

62 "model": "gpt-live-1"

63 }62 }

64}63}

65```64```


86 85 

87 Initial configuration for a primary WebSocket. Send session.start first and wait for session.started before application commands. WebRTC creation already starts the session; do not send this event again on its data channel.86 Initial configuration for a primary WebSocket. Send session.start first and wait for session.started before application commands. WebRTC creation already starts the session; do not send this event again on its data channel.

88 87 

89 - `model: string or "gpt-live-1"`88 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

90 89 

91 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.90 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

92 91 


94 93 

95 `minLength: 1`94 `minLength: 1`

96 95 

97 - `"gpt-live-1"`96 - `"gpt-live-1" or "gpt-live-1.1"`

98 97 

99 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.98 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

100 99 

101 - `"gpt-live-1"`100 - `"gpt-live-1"`

102 101 

102 - `"gpt-live-1.1"`

103 

103 - `audio: optional object { format, output }`104 - `audio: optional object { format, output }`

104 105 

105 Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.106 Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.


1487 "type": "session.start",1488 "type": "session.start",

1488 "event_id": "evt_start_001",1489 "event_id": "evt_start_001",

1489 "session": {1490 "session": {

1490 "model": "gpt-live-1",1491 "model": "gpt-live-1.1",

1491 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",1492 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",

1492 "audio": {1493 "audio": {

1493 "format": {1494 "format": {


8375 8376 

8376 The Unix timestamp, in seconds, at which the Live session expires.8377 The Unix timestamp, in seconds, at which the Live session expires.

8377 8378 

8378 - `model: string or "gpt-live-1"`8379 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

8379 8380 

8380 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.8381 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

8381 8382 


8383 8384 

8384 `minLength: 1`8385 `minLength: 1`

8385 8386 

8386 - `"gpt-live-1"`8387 - `"gpt-live-1" or "gpt-live-1.1"`

8387 8388 

8388 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.8389 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

8389 8390 

8390 - `"gpt-live-1"`8391 - `"gpt-live-1"`

8391 8392 

8393 - `"gpt-live-1.1"`

8394 

8392 - `status: "active" (default: "active")`8395 - `status: "active" (default: "active")`

8393 8396 

8394 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.8397 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


9782 "client_event_id": "evt_start_001",9785 "client_event_id": "evt_start_001",

9783 "session": {9786 "session": {

9784 "id": "live_abc123",9787 "id": "live_abc123",

9785 "model": "gpt-live-1",9788 "model": "gpt-live-1.1",

9786 "status": "active",9789 "status": "active",

9787 "expires_at": 1788555600,9790 "expires_at": 1788555600,

9788 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",9791 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


9829 9832 

9830 The Unix timestamp, in seconds, at which the Live session expires.9833 The Unix timestamp, in seconds, at which the Live session expires.

9831 9834 

9832 - `model: string or "gpt-live-1"`9835 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

9833 9836 

9834 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.9837 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

9835 9838 


9837 9840 

9838 `minLength: 1`9841 `minLength: 1`

9839 9842 

9840 - `"gpt-live-1"`9843 - `"gpt-live-1" or "gpt-live-1.1"`

9841 9844 

9842 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.9845 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

9843 9846 

9844 - `"gpt-live-1"`9847 - `"gpt-live-1"`

9845 9848 

9849 - `"gpt-live-1.1"`

9850 

9846 - `status: "active" (default: "active")`9851 - `status: "active" (default: "active")`

9847 9852 

9848 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.9853 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


11236 "client_event_id": "evt_update_001",11241 "client_event_id": "evt_update_001",

11237 "session": {11242 "session": {

11238 "id": "live_def456",11243 "id": "live_def456",

11239 "model": "gpt-live-1",11244 "model": "gpt-live-1.1",

11240 "status": "active",11245 "status": "active",

11241 "expires_at": 1788555600,11246 "expires_at": 1788555600,

11242 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",11247 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


11253 "delegation": {11258 "delegation": {

11254 "type": "responses",11259 "type": "responses",

11255 "responses": {11260 "responses": {

11256 "model": "gpt-6-astra",11261 "model": "gpt-6.2-astra",

11257 "instructions": "Check restaurant availability. Ask before confirming a booking.",11262 "instructions": "Check restaurant availability. Ask before confirming a booking.",

11258 "max_output_tokens": 1024,11263 "max_output_tokens": 1024,

11259 "tools": []11264 "tools": []


12524 12529 

12525 The cumulative Live audio usage so far.12530 The cumulative Live audio usage so far.

12526 12531 

12527 - `seconds: number`12532 - `seconds: integer`

12533 

12534 The cumulative billable duration in whole seconds. When present, the active and paused breakdown adds up to this total.

12528 12535 

12529 The cumulative Live audio duration in seconds. Do not sum this value across usage events.12536 - `active_seconds: optional integer`

12537 

12538 The remaining billable seconds attributed to active audio and any unused prepaid duration.

12539 

12540 - `paused_seconds: optional integer`

12541 

12542 Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.

12530 12543 

12531- `client_event_id: optional string`12544- `client_event_id: optional string`

12532 12545 


12547 "type": "session.usage.updated",12560 "type": "session.usage.updated",

12548 "event_id": "evt_usage_001",12561 "event_id": "evt_usage_001",

12549 "usage": {12562 "usage": {

12550 "seconds": 32.512563 "seconds": 32

12551 },12564 },

12552 "context_window": {12565 "context_window": {

12553 "usage_ratio": 0.1212566 "usage_ratio": 0.12


12599 12612 

12600 The Unix timestamp, in seconds, at which the Live session expires.12613 The Unix timestamp, in seconds, at which the Live session expires.

12601 12614 

12602 - `model: string or "gpt-live-1"`12615 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

12603 12616 

12604 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.12617 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

12605 12618 


12607 12620 

12608 `minLength: 1`12621 `minLength: 1`

12609 12622 

12610 - `"gpt-live-1"`12623 - `"gpt-live-1" or "gpt-live-1.1"`

12611 12624 

12612 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.12625 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

12613 12626 

12614 - `"gpt-live-1"`12627 - `"gpt-live-1"`

12615 12628 

12629 - `"gpt-live-1.1"`

12630 

12616 - `status: "active" (default: "active")`12631 - `status: "active" (default: "active")`

12617 12632 

12618 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.12633 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


13997 14012 

13998 The final cumulative Live audio usage after session finalization.14013 The final cumulative Live audio usage after session finalization.

13999 14014 

14000 - `seconds: number`14015 - `seconds: integer`

14016 

14017 The cumulative billable duration in whole seconds. When present, the active and paused breakdown adds up to this total.

14018 

14019 - `active_seconds: optional integer`

14020 

14021 The remaining billable seconds attributed to active audio and any unused prepaid duration.

14001 14022 

14002 The cumulative Live audio duration in seconds. Do not sum this value across usage events.14023 - `paused_seconds: optional integer`

14024 

14025 Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.

14003 14026 

14004- `client_event_id: optional string`14027- `client_event_id: optional string`

14005 14028 


14015 "reason": "close_requested",14038 "reason": "close_requested",

14016 "session": {14039 "session": {

14017 "id": "live_abc123",14040 "id": "live_abc123",

14018 "model": "gpt-live-1",14041 "model": "gpt-live-1.1",

14019 "status": "active",14042 "status": "active",

14020 "expires_at": 1788555600,14043 "expires_at": 1788555600,

14021 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",14044 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


14034 }14057 }

14035 },14058 },

14036 "usage": {14059 "usage": {

14037 "seconds": 45.814060 "seconds": 45

14038 }14061 }

14039}14062}

14040```14063```


14146}14169}

14147```14170```

14148 14171 

14172<a id="session.resumed"></a>

14173 

14174### session.resumed

14175 

14176Sent when speech wakes inference and it is ready for audio in a Live WebRTC session. This occurs on the first wake and after each later wake. Delivered to the sideband and, when permitted by its event settings, the data channel.

14177 

14178#### Schema

14179 

14180Schema name: `LiveSessionResumed`

14181 

14182- `event_id: string`

14183 

14184 The unique ID of the Live server event.

14185 

14186- `type: "session.resumed" (default: "session.resumed")`

14187 

14188 - `"session.resumed"`

14189 

14190- `client_event_id: optional string`

14191 

14192 The event_id of the client command associated with this server event, when supplied.

14193 

14194#### Example

14195 

14196```json

14197{

14198 "type": "session.resumed",

14199 "event_id": "evt_resumed_001"

14200}

14201```

14202 

14203<a id="session.paused"></a>

14204 

14205### session.paused

14206 

14207Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC connection, sideband, and session ID persist. Delivered to the sideband and, when permitted by its event settings, the data channel.

14208 

14209#### Schema

14210 

14211Schema name: `LiveSessionPaused`

14212 

14213- `event_id: string`

14214 

14215 The unique ID of the Live server event.

14216 

14217- `type: "session.paused" (default: "session.paused")`

14218 

14219 - `"session.paused"`

14220 

14221- `client_event_id: optional string`

14222 

14223 The event_id of the client command associated with this server event, when supplied.

14224 

14225#### Example

14226 

14227```json

14228{

14229 "type": "session.paused",

14230 "event_id": "evt_paused_001"

14231}

14232```

14233 

14149<a id="server-events-session.input_audio.append"></a>14234<a id="server-events-session.input_audio.append"></a>

14150 14235 

14151### session.input_audio.append14236### session.input_audio.append

Details

53 "session": {53 "session": {

54 "id": "live_123",54 "id": "live_123",

55 "expires_at": 1788307200,55 "expires_at": 1788307200,

56 "status": "active",56 "status": "active"

57 "model": "gpt-live-1"

58 }57 }

59}58}

60```59```


6936 6935 

6937 The Unix timestamp, in seconds, at which the Live session expires.6936 The Unix timestamp, in seconds, at which the Live session expires.

6938 6937 

6939 - `model: string or "gpt-live-1"`6938 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

6940 6939 

6941 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.6940 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

6942 6941 


6944 6943 

6945 `minLength: 1`6944 `minLength: 1`

6946 6945 

6947 - `"gpt-live-1"`6946 - `"gpt-live-1" or "gpt-live-1.1"`

6948 6947 

6949 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.6948 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

6950 6949 

6951 - `"gpt-live-1"`6950 - `"gpt-live-1"`

6952 6951 

6952 - `"gpt-live-1.1"`

6953 

6953 - `status: "active" (default: "active")`6954 - `status: "active" (default: "active")`

6954 6955 

6955 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.6956 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


8343 "client_event_id": "evt_start_001",8344 "client_event_id": "evt_start_001",

8344 "session": {8345 "session": {

8345 "id": "live_abc123",8346 "id": "live_abc123",

8346 "model": "gpt-live-1",8347 "model": "gpt-live-1.1",

8347 "status": "active",8348 "status": "active",

8348 "expires_at": 1788555600,8349 "expires_at": 1788555600,

8349 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",8350 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


8390 8391 

8391 The Unix timestamp, in seconds, at which the Live session expires.8392 The Unix timestamp, in seconds, at which the Live session expires.

8392 8393 

8393 - `model: string or "gpt-live-1"`8394 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

8394 8395 

8395 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.8396 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

8396 8397 


8398 8399 

8399 `minLength: 1`8400 `minLength: 1`

8400 8401 

8401 - `"gpt-live-1"`8402 - `"gpt-live-1" or "gpt-live-1.1"`

8402 8403 

8403 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.8404 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

8404 8405 

8405 - `"gpt-live-1"`8406 - `"gpt-live-1"`

8406 8407 

8408 - `"gpt-live-1.1"`

8409 

8407 - `status: "active" (default: "active")`8410 - `status: "active" (default: "active")`

8408 8411 

8409 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.8412 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


9797 "client_event_id": "evt_update_001",9800 "client_event_id": "evt_update_001",

9798 "session": {9801 "session": {

9799 "id": "live_def456",9802 "id": "live_def456",

9800 "model": "gpt-live-1",9803 "model": "gpt-live-1.1",

9801 "status": "active",9804 "status": "active",

9802 "expires_at": 1788555600,9805 "expires_at": 1788555600,

9803 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",9806 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


9814 "delegation": {9817 "delegation": {

9815 "type": "responses",9818 "type": "responses",

9816 "responses": {9819 "responses": {

9817 "model": "gpt-6-astra",9820 "model": "gpt-6.2-astra",

9818 "instructions": "Check restaurant availability. Ask before confirming a booking.",9821 "instructions": "Check restaurant availability. Ask before confirming a booking.",

9819 "max_output_tokens": 1024,9822 "max_output_tokens": 1024,

9820 "tools": []9823 "tools": []


11085 11088 

11086 The cumulative Live audio usage so far.11089 The cumulative Live audio usage so far.

11087 11090 

11088 - `seconds: number`11091 - `seconds: integer`

11092 

11093 The cumulative billable duration in whole seconds. When present, the active and paused breakdown adds up to this total.

11094 

11095 - `active_seconds: optional integer`

11096 

11097 The remaining billable seconds attributed to active audio and any unused prepaid duration.

11089 11098 

11090 The cumulative Live audio duration in seconds. Do not sum this value across usage events.11099 - `paused_seconds: optional integer`

11100 

11101 Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.

11091 11102 

11092- `client_event_id: optional string`11103- `client_event_id: optional string`

11093 11104 


11108 "type": "session.usage.updated",11119 "type": "session.usage.updated",

11109 "event_id": "evt_usage_001",11120 "event_id": "evt_usage_001",

11110 "usage": {11121 "usage": {

11111 "seconds": 32.511122 "seconds": 32

11112 },11123 },

11113 "context_window": {11124 "context_window": {

11114 "usage_ratio": 0.1211125 "usage_ratio": 0.12


11160 11171 

11161 The Unix timestamp, in seconds, at which the Live session expires.11172 The Unix timestamp, in seconds, at which the Live session expires.

11162 11173 

11163 - `model: string or "gpt-live-1"`11174 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

11164 11175 

11165 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.11176 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

11166 11177 


11168 11179 

11169 `minLength: 1`11180 `minLength: 1`

11170 11181 

11171 - `"gpt-live-1"`11182 - `"gpt-live-1" or "gpt-live-1.1"`

11172 11183 

11173 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.11184 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

11174 11185 

11175 - `"gpt-live-1"`11186 - `"gpt-live-1"`

11176 11187 

11188 - `"gpt-live-1.1"`

11189 

11177 - `status: "active" (default: "active")`11190 - `status: "active" (default: "active")`

11178 11191 

11179 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.11192 The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.


12558 12571 

12559 The final cumulative Live audio usage after session finalization.12572 The final cumulative Live audio usage after session finalization.

12560 12573 

12561 - `seconds: number`12574 - `seconds: integer`

12575 

12576 The cumulative billable duration in whole seconds. When present, the active and paused breakdown adds up to this total.

12562 12577 

12563 The cumulative Live audio duration in seconds. Do not sum this value across usage events.12578 - `active_seconds: optional integer`

12579 

12580 The remaining billable seconds attributed to active audio and any unused prepaid duration.

12581 

12582 - `paused_seconds: optional integer`

12583 

12584 Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.

12564 12585 

12565- `client_event_id: optional string`12586- `client_event_id: optional string`

12566 12587 


12576 "reason": "close_requested",12597 "reason": "close_requested",

12577 "session": {12598 "session": {

12578 "id": "live_abc123",12599 "id": "live_abc123",

12579 "model": "gpt-live-1",12600 "model": "gpt-live-1.1",

12580 "status": "active",12601 "status": "active",

12581 "expires_at": 1788555600,12602 "expires_at": 1788555600,

12582 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",12603 "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",


12595 }12616 }

12596 },12617 },

12597 "usage": {12618 "usage": {

12598 "seconds": 45.812619 "seconds": 45

12599 }12620 }

12600}12621}

12601```12622```


12707}12728}

12708```12729```

12709 12730 

12731<a id="session.resumed"></a>

12732 

12733### session.resumed

12734 

12735Sent when speech wakes inference and it is ready for audio in a Live WebRTC session. This occurs on the first wake and after each later wake. Delivered to the sideband and, when permitted by its event settings, the data channel.

12736 

12737#### Schema

12738 

12739Schema name: `LiveSessionResumed`

12740 

12741- `event_id: string`

12742 

12743 The unique ID of the Live server event.

12744 

12745- `type: "session.resumed" (default: "session.resumed")`

12746 

12747 - `"session.resumed"`

12748 

12749- `client_event_id: optional string`

12750 

12751 The event_id of the client command associated with this server event, when supplied.

12752 

12753#### Example

12754 

12755```json

12756{

12757 "type": "session.resumed",

12758 "event_id": "evt_resumed_001"

12759}

12760```

12761 

12762<a id="session.paused"></a>

12763 

12764### session.paused

12765 

12766Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC connection, sideband, and session ID persist. Delivered to the sideband and, when permitted by its event settings, the data channel.

12767 

12768#### Schema

12769 

12770Schema name: `LiveSessionPaused`

12771 

12772- `event_id: string`

12773 

12774 The unique ID of the Live server event.

12775 

12776- `type: "session.paused" (default: "session.paused")`

12777 

12778 - `"session.paused"`

12779 

12780- `client_event_id: optional string`

12781 

12782 The event_id of the client command associated with this server event, when supplied.

12783 

12784#### Example

12785 

12786```json

12787{

12788 "type": "session.paused",

12789 "event_id": "evt_paused_001"

12790}

12791```

12792 

12710<a id="session.input_audio.append"></a>12793<a id="session.input_audio.append"></a>

12711 12794 

12712### session.input_audio.append12795### session.input_audio.append

Details

20 20 

21 Model and startup configuration for the Live session that answers the incoming SIP call.21 Model and startup configuration for the Live session that answers the incoming SIP call.

22 22 

23 - `model: string or "gpt-live-1"`23 - `model: string or "gpt-live-1" or "gpt-live-1.1"`

24 24 

25 The Live model to use for the accepted call.25 The Live model to use for the accepted call.

26 26 


30 30 

31 `minLength: 1`31 `minLength: 1`

32 32 

33 - `"gpt-live-1"`33 - `"gpt-live-1" or "gpt-live-1.1"`

34 34 

35 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.35 The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

36 36 

37 - `"gpt-live-1"`37 - `"gpt-live-1"`

38 38 

39 - `"gpt-live-1.1"`

40 

39 - `type: "live" (default: "live")`41 - `type: "live" (default: "live")`

40 42 

41 The session type. Always `live`.43 The session type. Always `live`.


1318 -H "Authorization: Bearer $OPENAI_API_KEY" \1320 -H "Authorization: Bearer $OPENAI_API_KEY" \

1319 -d '{1321 -d '{

1320 "session": {1322 "session": {

1321 "model": "gpt-live-1",1323 "model": "gpt-live-1.1",

1322 "type": "live"1324 "type": "live"

1323 }1325 }

1324 }'1326 }'

Details

843### Example843### Example

844 844 

845```http845```http

846curl https://api.openai.com/v1/live/sessions/$SESSION_ID/fork \846curl https://api.openai.com/v1/live/sessions/live_123/fork \

847 -H 'Content-Type: application/json' \

848 -H "Authorization: Bearer $OPENAI_API_KEY" \847 -H "Authorization: Bearer $OPENAI_API_KEY" \

849 -d '{848 -H "Content-Type: application/json" \

850 "transport": {849 -d '{"session":{},"transport":{"type":"webrtc","sdp":"<SDP offer>"}}'

851 "sdp": "x",

852 "type": "webrtc"

853 }

854 }'

855```850```

856 851 

857#### 201 — Example852#### 201 — Example


867 }862 }

868}863}

869```864```

870 

871### Example

872 

873```http

874curl https://api.openai.com/v1/live/sessions/live_123/fork \

875 -H "Authorization: Bearer $OPENAI_API_KEY" \

876 -H "Content-Type: application/json" \

877 -d '{"session":{},"transport":{"type":"webrtc","sdp":"<SDP offer>"}}'

878```

Details

25### Example25### Example

26 26 

27```http27```http

28curl https://api.openai.com/v1/models/$MODEL \28curl https://api.openai.com/v1/models/ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123 \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "id": "id",

38 "deleted": true,

39 "object": "object"

40}

41```

42 

43### Example

44 

45```http

46curl https://api.openai.com/v1/models/ft:gpt-4o-mini:acemeco:suffix:abc123 \

47 -X DELETE \29 -X DELETE \

48 -H "Authorization: Bearer $OPENAI_API_KEY"30 -H "Authorization: Bearer $OPENAI_API_KEY"

49```31```


52 34 

53```json35```json

54{36{

55 "id": "ft:gpt-4o-mini:acemeco:suffix:abc123",37 "id": "ft:gpt-4.1-mini-2025-04-14:acemeco:suffix:abc123",

56 "object": "model",38 "object": "model",

57 "deleted": true39 "deleted": true

58}40}

Details

47 -H "Authorization: Bearer $OPENAI_API_KEY"47 -H "Authorization: Bearer $OPENAI_API_KEY"

48```48```

49 49 

50#### 200 — Example

51 

52```json

53{

54 "data": [

55 {

56 "id": "id",

57 "created": 0,

58 "object": "model",

59 "owned_by": "owned_by",

60 "shutdown_date": "2019-12-27"

61 }

62 ],

63 "object": "list"

64}

65```

66 

67### Example

68 

69```http

70curl https://api.openai.com/v1/models \

71 -H "Authorization: Bearer $OPENAI_API_KEY"

72```

73 

74#### Response example50#### Response example

75 51 

76```json52```json

Details

47### Example47### Example

48 48 

49```http49```http

50curl https://api.openai.com/v1/models/$MODEL \50curl https://api.openai.com/v1/models/gpt-6.2-astra \

51 -H "Authorization: Bearer $OPENAI_API_KEY"

52```

53 

54#### 200 — Example

55 

56```json

57{

58 "id": "id",

59 "created": 0,

60 "object": "model",

61 "owned_by": "owned_by",

62 "shutdown_date": "2019-12-27"

63}

64```

65 

66### Example

67 

68```http

69curl https://api.openai.com/v1/models/gpt-6-astra \

70 -H "Authorization: Bearer $OPENAI_API_KEY"51 -H "Authorization: Bearer $OPENAI_API_KEY"

71```52```

72 53 


74 55 

75```json56```json

76{57{

77 "id": "gpt-6-astra",58 "id": "gpt-6.2-astra",

78 "object": "model",59 "object": "model",

79 "created": 1686935002,60 "created": 1686935002,

80 "owned_by": "openai",61 "owned_by": "openai",

Details

912 912 

913### Example913### Example

914 914 

915```http

916curl https://api.openai.com/v1/realtime/calls/$CALL_ID/accept \

917 -H 'Content-Type: application/json' \

918 -H "Authorization: Bearer $OPENAI_API_KEY" \

919 -d '{

920 "type": "realtime"

921 }'

922```

923 

924### Example

925 

926```http915```http

927curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/accept \916curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/accept \

928 -H "Authorization: Bearer $OPENAI_API_KEY" \917 -H "Authorization: Bearer $OPENAI_API_KEY" \

929 -H "Content-Type: application/json" \918 -H "Content-Type: application/json" \

930 -d '{919 -d '{

931 "type": "realtime",920 "type": "realtime",

932 "model": "gpt-realtime",921 "model": "gpt-realtime-2.1",

933 "instructions": "You are Alex, a friendly concierge for Example Corp.",922 "instructions": "You are Alex, a friendly concierge for Example Corp.",

934 }'923 }'

935```924```

Details

922 922 

923### Example923### Example

924 924 

925```http

926curl https://api.openai.com/v1/realtime/calls \

927 -H 'Content-Type: multipart/form-data' \

928 -H "Authorization: Bearer $OPENAI_API_KEY" \

929 -F sdp=sdp

930```

931 

932### Example

933 

934```http925```http

935curl -X POST https://api.openai.com/v1/realtime/calls \926curl -X POST https://api.openai.com/v1/realtime/calls \

936 -H "Authorization: Bearer $OPENAI_API_KEY" \927 -H "Authorization: Bearer $OPENAI_API_KEY" \

937 -F "sdp=<offer.sdp;type=application/sdp" \928 -F "sdp=<offer.sdp;type=application/sdp" \

938 -F 'session={"type":"realtime","model":"gpt-realtime"};type=application/json'929 -F 'session={"type":"realtime","model":"gpt-realtime-2.1"};type=application/json'

939```930```

940 931 

941#### Response example932#### Response example

Details

19 19 

20### Example20### Example

21 21 

22```http

23curl https://api.openai.com/v1/realtime/calls/$CALL_ID/hangup \

24 -X POST \

25 -H "Authorization: Bearer $OPENAI_API_KEY"

26```

27 

28### Example

29 

30```http22```http

31curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/hangup \23curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/hangup \

32 -H "Authorization: Bearer $OPENAI_API_KEY"24 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

25 25 

26### Example26### Example

27 27 

28```http

29curl https://api.openai.com/v1/realtime/calls/$CALL_ID/refer \

30 -H 'Content-Type: application/json' \

31 -H "Authorization: Bearer $OPENAI_API_KEY" \

32 -d '{

33 "target_uri": "tel:+14155550123"

34 }'

35```

36 

37### Example

38 

39```http28```http

40curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/refer \29curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/refer \

41 -H "Authorization: Bearer $OPENAI_API_KEY" \30 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

25 25 

26### Example26### Example

27 27 

28```http

29curl https://api.openai.com/v1/realtime/calls/$CALL_ID/reject \

30 -X POST \

31 -H "Authorization: Bearer $OPENAI_API_KEY"

32```

33 

34### Example

35 

36```http28```http

37curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/reject \29curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/reject \

38 -H "Authorization: Bearer $OPENAI_API_KEY" \30 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

2119 2119 

2120### Example2120### Example

2121 2121 

2122```http

2123curl https://api.openai.com/v1/realtime/client_secrets \

2124 -H 'Content-Type: application/json' \

2125 -H "Authorization: Bearer $OPENAI_API_KEY" \

2126 -d '{}'

2127```

2128 

2129#### 200 — Example

2130 

2131```json

2132{

2133 "expires_at": 0,

2134 "session": {

2135 "id": "id",

2136 "object": "realtime.session",

2137 "type": "realtime",

2138 "audio": {

2139 "input": {

2140 "format": {

2141 "rate": 24000,

2142 "type": "audio/pcm"

2143 },

2144 "noise_reduction": {

2145 "strength": 0,

2146 "type": "near_field"

2147 },

2148 "transcription": {

2149 "keywords": [

2150 "string"

2151 ],

2152 "language": "language",

2153 "languages": [

2154 "string"

2155 ],

2156 "model": "gpt-transcribe",

2157 "prompt": "prompt"

2158 },

2159 "turn_detection": {

2160 "type": "server_vad",

2161 "create_response": true,

2162 "idle_timeout_ms": 5000,

2163 "interrupt_response": true,

2164 "prefix_padding_ms": 0,

2165 "silence_duration_ms": 0,

2166 "threshold": 0

2167 }

2168 },

2169 "output": {

2170 "format": {

2171 "rate": 24000,

2172 "type": "audio/pcm"

2173 },

2174 "speed": 0.25,

2175 "voice": "ash"

2176 }

2177 },

2178 "expires_at": 0,

2179 "include": [

2180 "item.input_audio_transcription.logprobs"

2181 ],

2182 "instructions": "instructions",

2183 "max_output_tokens": "inf",

2184 "model": "gpt-realtime-1.5",

2185 "output_modalities": [

2186 "text"

2187 ],

2188 "prompt": {

2189 "id": "id",

2190 "variables": {

2191 "foo": "string"

2192 },

2193 "version": "version"

2194 },

2195 "reasoning": {

2196 "effort": "minimal"

2197 },

2198 "tool_choice": "none",

2199 "tools": [

2200 {

2201 "description": "description",

2202 "name": "name",

2203 "parameters": {},

2204 "type": "function"

2205 }

2206 ],

2207 "tracing": "auto",

2208 "truncation": "auto"

2209 },

2210 "value": "value"

2211}

2212```

2213 

2214### Example

2215 

2216```http2122```http

2217curl -X POST https://api.openai.com/v1/realtime/client_secrets \2123curl -X POST https://api.openai.com/v1/realtime/client_secrets \

2218 -H "Authorization: Bearer $OPENAI_API_KEY" \2124 -H "Authorization: Bearer $OPENAI_API_KEY" \


2224 },2130 },

2225 "session": {2131 "session": {

2226 "type": "realtime",2132 "type": "realtime",

2227 "model": "gpt-realtime",2133 "model": "gpt-realtime-2.1",

2228 "instructions": "You are a friendly assistant."2134 "instructions": "You are a friendly assistant."

2229 }2135 }

2230 }'2136 }'


2240 "type": "realtime",2146 "type": "realtime",

2241 "object": "realtime.session",2147 "object": "realtime.session",

2242 "id": "sess_C9CiUVUzUzYIssh3ELY1d",2148 "id": "sess_C9CiUVUzUzYIssh3ELY1d",

2243 "model": "gpt-realtime",2149 "model": "gpt-realtime-2.1",

2244 "output_modalities": [2150 "output_modalities": [

2245 "audio"2151 "audio"

2246 ],2152 ],

Details

737 737 

738### Example738### Example

739 739 

740```http

741curl https://api.openai.com/v1/realtime/sessions \

742 -H 'Content-Type: application/json' \

743 -H "Authorization: Bearer $OPENAI_API_KEY" \

744 -d '{

745 "client_secret": {

746 "expires_at": 0,

747 "value": "value"

748 }

749 }'

750```

751 

752#### 200 — Example

753 

754```json

755{

756 "id": "id",

757 "audio": {

758 "input": {

759 "format": {

760 "rate": 24000,

761 "type": "audio/pcm"

762 },

763 "noise_reduction": {

764 "type": "near_field"

765 },

766 "transcription": {

767 "keywords": [

768 "string"

769 ],

770 "language": "language",

771 "languages": [

772 "string"

773 ],

774 "model": "gpt-transcribe",

775 "prompt": "prompt"

776 },

777 "turn_detection": {

778 "prefix_padding_ms": 0,

779 "silence_duration_ms": 0,

780 "threshold": 0,

781 "type": "type"

782 }

783 },

784 "output": {

785 "format": {

786 "rate": 24000,

787 "type": "audio/pcm"

788 },

789 "speed": 0,

790 "voice": "ash"

791 }

792 },

793 "expires_at": 0,

794 "include": [

795 "item.input_audio_transcription.logprobs"

796 ],

797 "instructions": "instructions",

798 "max_output_tokens": "inf",

799 "model": "model",

800 "object": "object",

801 "output_modalities": [

802 "text"

803 ],

804 "tool_choice": "tool_choice",

805 "tools": [

806 {

807 "description": "description",

808 "name": "name",

809 "parameters": {},

810 "type": "function"

811 }

812 ],

813 "tracing": "auto",

814 "turn_detection": {

815 "prefix_padding_ms": 0,

816 "silence_duration_ms": 0,

817 "threshold": 0,

818 "type": "type"

819 }

820}

821```

822 

823### Example

824 

825```http740```http

826curl -X POST https://api.openai.com/v1/realtime/sessions \741curl -X POST https://api.openai.com/v1/realtime/sessions \

827 -H "Authorization: Bearer $OPENAI_API_KEY" \742 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

258 258 

259### Example259### Example

260 260 

261```http

262curl https://api.openai.com/v1/realtime/transcription_sessions \

263 -H 'Content-Type: application/json' \

264 -H "Authorization: Bearer $OPENAI_API_KEY" \

265 -d '{}'

266```

267 

268#### 200 — Example

269 

270```json

271{

272 "client_secret": {

273 "expires_at": 0,

274 "value": "value"

275 },

276 "input_audio_format": "input_audio_format",

277 "input_audio_transcription": {

278 "keywords": [

279 "string"

280 ],

281 "language": "language",

282 "languages": [

283 "string"

284 ],

285 "model": "gpt-transcribe",

286 "prompt": "prompt"

287 },

288 "modalities": [

289 "text"

290 ],

291 "turn_detection": {

292 "prefix_padding_ms": 0,

293 "silence_duration_ms": 0,

294 "threshold": 0,

295 "type": "type"

296 }

297}

298```

299 

300### Example

301 

302```http261```http

303curl -X POST https://api.openai.com/v1/realtime/transcription_sessions \262curl -X POST https://api.openai.com/v1/realtime/transcription_sessions \

304 -H "Authorization: Bearer $OPENAI_API_KEY" \263 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

174 174 

175### Example175### Example

176 176 

177```http

178curl https://api.openai.com/v1/realtime/translations/client_secrets \

179 -H 'Content-Type: application/json' \

180 -H "Authorization: Bearer $OPENAI_API_KEY" \

181 -d '{

182 "session": {

183 "model": "model"

184 }

185 }'

186```

187 

188#### 200 — Example

189 

190```json

191{

192 "expires_at": 0,

193 "session": {

194 "id": "id",

195 "audio": {

196 "input": {

197 "noise_reduction": {

198 "type": "near_field",

199 "strength": 0

200 },

201 "transcription": {

202 "model": "model"

203 }

204 },

205 "output": {

206 "language": "language"

207 }

208 },

209 "expires_at": 0,

210 "model": "model",

211 "type": "translation"

212 },

213 "value": "value"

214}

215```

216 

217### Example

218 

219```http177```http

220curl -X POST https://api.openai.com/v1/realtime/translations/client_secrets \178curl -X POST https://api.openai.com/v1/realtime/translations/client_secrets \

221 -H "Authorization: Bearer $OPENAI_API_KEY" \179 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

4981 4981 

4982 - `model: ResponsesModel`4982 - `model: ResponsesModel`

4983 4983 

4984 Model ID used to generate the response, like `gpt-6-astra`. OpenAI4984 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

4985 offers a wide range of models with different capabilities, performance4985 offers a wide range of models with different capabilities, performance

4986 characteristics, and price points. Refer to the [model guide](/api/docs/models)4986 characteristics, and price points. Refer to the [model guide](/api/docs/models)

4987 to browse and compare available models.4987 to browse and compare available models.


10704 10704 

10705### Example10705### Example

10706 10706 

10707```http

10708curl https://api.openai.com/v1/responses/$RESPONSE_ID/cancel \

10709 -X POST \

10710 -H "Authorization: Bearer $OPENAI_API_KEY"

10711```

10712 

10713#### 200 — Example

10714 

10715```json

10716{

10717 "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",

10718 "object": "response",

10719 "access_programs": null,

10720 "created_at": 1741476777,

10721 "status": "completed",

10722 "completed_at": 1741476778,

10723 "error": null,

10724 "incomplete_details": null,

10725 "instructions": null,

10726 "max_output_tokens": null,

10727 "model": "gpt-6-astra",

10728 "output": [

10729 {

10730 "type": "message",

10731 "id": "msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41",

10732 "status": "completed",

10733 "role": "assistant",

10734 "content": [

10735 {

10736 "type": "output_text",

10737 "text": "The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.",

10738 "annotations": [],

10739 "logprobs": []

10740 }

10741 ]

10742 }

10743 ],

10744 "parallel_tool_calls": true,

10745 "previous_response_id": null,

10746 "reasoning": {

10747 "effort": null,

10748 "summary": null,

10749 "context": null

10750 },

10751 "store": true,

10752 "temperature": 1,

10753 "text": {

10754 "format": {

10755 "type": "text"

10756 }

10757 },

10758 "tool_choice": "auto",

10759 "tools": [],

10760 "top_p": 1,

10761 "truncation": "disabled",

10762 "usage": {

10763 "input_tokens": 328,

10764 "input_tokens_details": {

10765 "cached_tokens": 0,

10766 "cache_write_tokens": 0

10767 },

10768 "output_tokens": 52,

10769 "output_tokens_details": {

10770 "reasoning_tokens": 0

10771 },

10772 "total_tokens": 380

10773 },

10774 "tool_usage": {

10775 "image_gen": {

10776 "input_tokens": 0,

10777 "input_tokens_details": {

10778 "text_tokens": 0,

10779 "image_tokens": 0

10780 },

10781 "output_tokens": 0,

10782 "output_tokens_details": {

10783 "text_tokens": 0,

10784 "image_tokens": 0

10785 },

10786 "total_tokens": 0

10787 },

10788 "web_search": {

10789 "num_requests": 0

10790 }

10791 },

10792 "user": null,

10793 "metadata": {},

10794 "conversation": {

10795 "id": "id"

10796 },

10797 "image": {

10798 "context_compression": "enabled"

10799 },

10800 "input_transformations": [

10801 {

10802 "id": "id",

10803 "action": "removed",

10804 "reason": "organization_mismatch",

10805 "type": "reasoning"

10806 }

10807 ],

10808 "moderation": {

10809 "input": {

10810 "categories": {

10811 "foo": true

10812 },

10813 "category_applied_input_types": {

10814 "foo": [

10815 "text"

10816 ]

10817 },

10818 "category_scores": {

10819 "foo": 0

10820 },

10821 "flagged": true,

10822 "model": "model",

10823 "type": "moderation_result"

10824 },

10825 "output": {

10826 "categories": {

10827 "foo": true

10828 },

10829 "category_applied_input_types": {

10830 "foo": [

10831 "text"

10832 ]

10833 },

10834 "category_scores": {

10835 "foo": 0

10836 },

10837 "flagged": true,

10838 "model": "model",

10839 "type": "moderation_result"

10840 }

10841 },

10842 "output_text": "output_text",

10843 "prompt_cache_diagnostics": {

10844 "cache_missed_tokens": 0,

10845 "reason": "model_changed",

10846 "type": "cache_miss",

10847 "comparison_reusable_tokens": 0

10848 },

10849 "prompt_cache_options": {

10850 "mode": "implicit",

10851 "ttl": "30m",

10852 "comparison_response_id": "comparison_response_id"

10853 },

10854 "service_tier": "auto"

10855}

10856```

10857 

10858### Example

10859 

10860```http10707```http

10861curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \10708curl -X POST https://api.openai.com/v1/responses/resp_123/cancel \

10862 -H "Content-Type: application/json" \10709 -H "Content-Type: application/json" \


10878 "incomplete_details": null,10725 "incomplete_details": null,

10879 "instructions": null,10726 "instructions": null,

10880 "max_output_tokens": null,10727 "max_output_tokens": null,

10881 "model": "gpt-6-astra",10728 "model": "gpt-6.2-astra",

10882 "output": [10729 "output": [

10883 {10730 {

10884 "type": "message",10731 "type": "message",

Details

14 14 

15- `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string or null`15- `model: "gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more or string or null`

16 16 

17 Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.17 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.

18 18 

19 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`19 - `"gpt-6-astra" or "gpt-6.2-astra" or "gpt-6.1-sol" or 112 more`

20 20 

21 Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.21 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/api/docs/models) to browse and compare available models.

22 22 

23 - `"gpt-6-astra"`23 - `"gpt-6-astra"`

24 24 


9762 9762 

9763### Example9763### Example

9764 9764 

9765```http

9766curl https://api.openai.com/v1/responses/compact \

9767 -H 'Content-Type: application/json' \

9768 -H "Authorization: Bearer $OPENAI_API_KEY" \

9769 -d '{

9770 "model": "gpt-6-astra",

9771 "previous_response_id": "resp_123"

9772 }'

9773```

9774 

9775#### 200 — Example

9776 

9777```json

9778{

9779 "id": "resp_001",

9780 "created_at": 1731459200,

9781 "object": "response.compaction",

9782 "output": [

9783 {

9784 "id": "msg_001",

9785 "status": "completed",

9786 "type": "message",

9787 "role": "user",

9788 "content": [

9789 {

9790 "type": "input_text",

9791 "text": "Summarize our launch checklist from last week."

9792 }

9793 ]

9794 },

9795 {

9796 "id": "msg_002",

9797 "status": "completed",

9798 "type": "message",

9799 "role": "user",

9800 "content": [

9801 {

9802 "type": "input_text",

9803 "text": "You are performing a CONTEXT CHECKPOINT COMPACTION..."

9804 }

9805 ]

9806 },

9807 {

9808 "type": "compaction",

9809 "id": "cmp_001",

9810 "encrypted_content": "encrypted-summary"

9811 }

9812 ],

9813 "usage": {

9814 "input_tokens": 42897,

9815 "input_tokens_details": {

9816 "cache_write_tokens": 0,

9817 "cached_tokens": 0,

9818 "cache_write_tokens_details": {

9819 "ttl_12h_tokens": 0,

9820 "ttl_30m_tokens": 0

9821 }

9822 },

9823 "output_tokens": 12000,

9824 "output_tokens_details": {

9825 "reasoning_tokens": 0

9826 },

9827 "total_tokens": 54897

9828 },

9829 "image": {

9830 "context_compression": "disabled"

9831 }

9832}

9833```

9834 

9835### Example

9836 

9837```http9765```http

9838curl -X POST https://api.openai.com/v1/responses/compact \9766curl -X POST https://api.openai.com/v1/responses/compact \

9839 -H "Content-Type: application/json" \9767 -H "Content-Type: application/json" \

9840 -H "Authorization: Bearer $OPENAI_API_KEY" \9768 -H "Authorization: Bearer $OPENAI_API_KEY" \

9841 -d '{9769 -d '{

9842 "model": "gpt-6-astra",9770 "model": "gpt-6.2-astra",

9843 "input": [9771 "input": [

9844 {9772 {

9845 "role": "user",9773 "role": "user",

Details

4974 4974 

4975- `model: optional ResponsesModel`4975- `model: optional ResponsesModel`

4976 4976 

4977 Model ID used to generate the response, like `gpt-6-astra`. OpenAI4977 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

4978 offers a wide range of models with different capabilities, performance4978 offers a wide range of models with different capabilities, performance

4979 characteristics, and price points. Refer to the [model guide](/api/docs/models)4979 characteristics, and price points. Refer to the [model guide](/api/docs/models)

4980 to browse and compare available models.4980 to browse and compare available models.


11724 11724 

11725 - `model: ResponsesModel`11725 - `model: ResponsesModel`

11726 11726 

11727 Model ID used to generate the response, like `gpt-6-astra`. OpenAI11727 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

11728 offers a wide range of models with different capabilities, performance11728 offers a wide range of models with different capabilities, performance

11729 characteristics, and price points. Refer to the [model guide](/api/docs/models)11729 characteristics, and price points. Refer to the [model guide](/api/docs/models)

11730 to browse and compare available models.11730 to browse and compare available models.


17451curl https://api.openai.com/v1/responses \17451curl https://api.openai.com/v1/responses \

17452 -H 'Content-Type: application/json' \17452 -H 'Content-Type: application/json' \

17453 -H "Authorization: Bearer $OPENAI_API_KEY" \17453 -H "Authorization: Bearer $OPENAI_API_KEY" \

17454 -d '"string"'17454 -d '{

17455 "model": "gpt-6.2-astra",

17456 "input": "Write a one-sentence bedtime story about a unicorn."

17457 }'

17455```17458```

17456 17459 

17457#### 200 — Example17460#### 200 — Example


17468 "incomplete_details": null,17471 "incomplete_details": null,

17469 "instructions": null,17472 "instructions": null,

17470 "max_output_tokens": null,17473 "max_output_tokens": null,

17471 "model": "gpt-6-astra",17474 "model": "gpt-6.2-astra",

17472 "output": [17475 "output": [

17473 {17476 {

17474 "type": "message",17477 "type": "message",


17606 -H "Content-Type: application/json" \17609 -H "Content-Type: application/json" \

17607 -H "Authorization: Bearer $OPENAI_API_KEY" \17610 -H "Authorization: Bearer $OPENAI_API_KEY" \

17608 -d '{17611 -d '{

17609 "model": "gpt-6-astra",17612 "model": "gpt-6.2-astra",

17610 "input": [17613 "input": [

17611 {17614 {

17612 "role": "user",17615 "role": "user",


17639 "instructions": null,17642 "instructions": null,

17640 "max_output_tokens": null,17643 "max_output_tokens": null,

17641 "max_tool_calls": null,17644 "max_tool_calls": null,

17642 "model": "gpt-6-astra",17645 "model": "gpt-6.2-astra",

17643 "output": [17646 "output": [

17644 {17647 {

17645 "id": "msg_686eef60d3e081a29283bdcbc4322fd90e34c516d176ff86",17648 "id": "msg_686eef60d3e081a29283bdcbc4322fd90e34c516d176ff86",


17699 -H "Content-Type: application/json" \17702 -H "Content-Type: application/json" \

17700 -H "Authorization: Bearer $OPENAI_API_KEY" \17703 -H "Authorization: Bearer $OPENAI_API_KEY" \

17701 -d '{17704 -d '{

17702 "model": "gpt-6-astra",17705 "model": "gpt-6.2-astra",

17703 "tools": [{17706 "tools": [{

17704 "type": "file_search",17707 "type": "file_search",

17705 "vector_store_ids": ["vs_1234567890"],17708 "vector_store_ids": ["vs_1234567890"],


17723 "incomplete_details": null,17726 "incomplete_details": null,

17724 "instructions": null,17727 "instructions": null,

17725 "max_output_tokens": null,17728 "max_output_tokens": null,

17726 "model": "gpt-6-astra",17729 "model": "gpt-6.2-astra",

17727 "output": [17730 "output": [

17728 {17731 {

17729 "type": "file_search_call",17732 "type": "file_search_call",


17852 -H "Content-Type: application/json" \17855 -H "Content-Type: application/json" \

17853 -H "Authorization: Bearer $OPENAI_API_KEY" \17856 -H "Authorization: Bearer $OPENAI_API_KEY" \

17854 -d '{17857 -d '{

17855 "model": "gpt-6-astra",17858 "model": "gpt-6.2-astra",

17856 "input": "What is the weather like in Boston today?",17859 "input": "What is the weather like in Boston today?",

17857 "tools": [17860 "tools": [

17858 {17861 {


17893 "incomplete_details": null,17896 "incomplete_details": null,

17894 "instructions": null,17897 "instructions": null,

17895 "max_output_tokens": null,17898 "max_output_tokens": null,

17896 "model": "gpt-6-astra",17899 "model": "gpt-6.2-astra",

17897 "output": [17900 "output": [

17898 {17901 {

17899 "type": "function_call",17902 "type": "function_call",


17972 -H "Content-Type: application/json" \17975 -H "Content-Type: application/json" \

17973 -H "Authorization: Bearer $OPENAI_API_KEY" \17976 -H "Authorization: Bearer $OPENAI_API_KEY" \

17974 -d '{17977 -d '{

17975 "model": "gpt-6-astra",17978 "model": "gpt-6.2-astra",

17976 "input": [17979 "input": [

17977 {17980 {

17978 "role": "user",17981 "role": "user",


18002 "incomplete_details": null,18005 "incomplete_details": null,

18003 "instructions": null,18006 "instructions": null,

18004 "max_output_tokens": null,18007 "max_output_tokens": null,

18005 "model": "gpt-6-astra",18008 "model": "gpt-6.2-astra",

18006 "output": [18009 "output": [

18007 {18010 {

18008 "type": "message",18011 "type": "message",


18060 -H "Content-Type: application/json" \18063 -H "Content-Type: application/json" \

18061 -H "Authorization: Bearer $OPENAI_API_KEY" \18064 -H "Authorization: Bearer $OPENAI_API_KEY" \

18062 -d '{18065 -d '{

18063 "model": "gpt-6-astra",18066 "model": "gpt-6.2-astra",

18064 "input": "How much wood would a woodchuck chuck?",18067 "input": "How much wood would a woodchuck chuck?",

18065 "reasoning": {18068 "reasoning": {

18066 "effort": "high"18069 "effort": "high"


18082 "incomplete_details": null,18085 "incomplete_details": null,

18083 "instructions": null,18086 "instructions": null,

18084 "max_output_tokens": null,18087 "max_output_tokens": null,

18085 "model": "gpt-6-astra",18088 "model": "gpt-6.2-astra",

18086 "output": [18089 "output": [

18087 {18090 {

18088 "type": "message",18091 "type": "message",


18140 -H "Content-Type: application/json" \18143 -H "Content-Type: application/json" \

18141 -H "Authorization: Bearer $OPENAI_API_KEY" \18144 -H "Authorization: Bearer $OPENAI_API_KEY" \

18142 -d '{18145 -d '{

18143 "model": "gpt-6-astra",18146 "model": "gpt-6.2-astra",

18144 "instructions": "You are a helpful assistant.",18147 "instructions": "You are a helpful assistant.",

18145 "input": "Hello!",18148 "input": "Hello!",

18146 "stream": true18149 "stream": true


18151 18154 

18152```json18155```json

18153event: response.created18156event: response.created

18154data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}18157data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6.2-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}

18155 18158 

18156event: response.in_progress18159event: response.in_progress

18157data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}18160data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6.2-astra","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}

18158 18161 

18159event: response.output_item.added18162event: response.output_item.added

18160data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]},"sequence_number":2}18163data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]},"sequence_number":2}


18177data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]},"sequence_number":12}18180data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]},"sequence_number":12}

18178 18181 

18179event: response.completed18182event: response.completed

18180data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0}},"user":null,"metadata":{}},"sequence_number":13}18183data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","access_programs":null,"created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-6.2-astra","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[],"logprobs":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":1.0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0}},"user":null,"metadata":{}},"sequence_number":13}

18181 18184 

18182```18185```

18183 18186 


18188 -H "Content-Type: application/json" \18191 -H "Content-Type: application/json" \

18189 -H "Authorization: Bearer $OPENAI_API_KEY" \18192 -H "Authorization: Bearer $OPENAI_API_KEY" \

18190 -d '{18193 -d '{

18191 "model": "gpt-6-astra",18194 "model": "gpt-6.2-astra",

18192 "input": "Tell me a three sentence bedtime story about a unicorn."18195 "input": "Tell me a three sentence bedtime story about a unicorn."

18193 }'18196 }'

18194```18197```


18207 "incomplete_details": null,18210 "incomplete_details": null,

18208 "instructions": null,18211 "instructions": null,

18209 "max_output_tokens": null,18212 "max_output_tokens": null,

18210 "model": "gpt-6-astra",18213 "model": "gpt-6.2-astra",

18211 "output": [18214 "output": [

18212 {18215 {

18213 "type": "message",18216 "type": "message",


18265 -H "Content-Type: application/json" \18268 -H "Content-Type: application/json" \

18266 -H "Authorization: Bearer $OPENAI_API_KEY" \18269 -H "Authorization: Bearer $OPENAI_API_KEY" \

18267 -d '{18270 -d '{

18268 "model": "gpt-6-astra",18271 "model": "gpt-6.2-astra",

18269 "tools": [{ "type": "web_search_preview" }],18272 "tools": [{ "type": "web_search_preview" }],

18270 "input": "What was a positive news story from today?"18273 "input": "What was a positive news story from today?"

18271 }'18274 }'


18285 "incomplete_details": null,18288 "incomplete_details": null,

18286 "instructions": null,18289 "instructions": null,

18287 "max_output_tokens": null,18290 "max_output_tokens": null,

18288 "model": "gpt-6-astra",18291 "model": "gpt-6.2-astra",

18289 "output": [18292 "output": [

18290 {18293 {

18291 "type": "web_search_call",18294 "type": "web_search_call",

Details

24 24 

25### Example25### Example

26 26 

27```http

28curl https://api.openai.com/v1/responses/$RESPONSE_ID \

29 -X DELETE \

30 -H "Authorization: Bearer $OPENAI_API_KEY"

31```

32 

33#### 200 — Example

34 

35```json

36{

37 "id": "id",

38 "deleted": true,

39 "object": "response.deleted"

40}

41```

42 

43### Example

44 

45```http27```http

46curl -X DELETE https://api.openai.com/v1/responses/resp_123 \28curl -X DELETE https://api.openai.com/v1/responses/resp_123 \

47 -H "Content-Type: application/json" \29 -H "Content-Type: application/json" \

Details

5025 5025 

5026 - `model: ResponsesModel`5026 - `model: ResponsesModel`

5027 5027 

5028 Model ID used to generate the response, like `gpt-6-astra`. OpenAI5028 Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI

5029 offers a wide range of models with different capabilities, performance5029 offers a wide range of models with different capabilities, performance

5030 characteristics, and price points. Refer to the [model guide](/api/docs/models)5030 characteristics, and price points. Refer to the [model guide](/api/docs/models)

5031 to browse and compare available models.5031 to browse and compare available models.


10748 10748 

10749### Example10749### Example

10750 10750 

10751```http

10752curl https://api.openai.com/v1/responses/$RESPONSE_ID \

10753 -H "Authorization: Bearer $OPENAI_API_KEY"

10754```

10755 

10756#### 200 — Example

10757 

10758```json

10759{

10760 "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",

10761 "object": "response",

10762 "access_programs": null,

10763 "created_at": 1741476777,

10764 "status": "completed",

10765 "completed_at": 1741476778,

10766 "error": null,

10767 "incomplete_details": null,

10768 "instructions": null,

10769 "max_output_tokens": null,

10770 "model": "gpt-6-astra",

10771 "output": [

10772 {

10773 "type": "message",

10774 "id": "msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41",

10775 "status": "completed",

10776 "role": "assistant",

10777 "content": [

10778 {

10779 "type": "output_text",

10780 "text": "The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.",

10781 "annotations": [],

10782 "logprobs": []

10783 }

10784 ]

10785 }

10786 ],

10787 "parallel_tool_calls": true,

10788 "previous_response_id": null,

10789 "reasoning": {

10790 "effort": null,

10791 "summary": null,

10792 "context": null

10793 },

10794 "store": true,

10795 "temperature": 1,

10796 "text": {

10797 "format": {

10798 "type": "text"

10799 }

10800 },

10801 "tool_choice": "auto",

10802 "tools": [],

10803 "top_p": 1,

10804 "truncation": "disabled",

10805 "usage": {

10806 "input_tokens": 328,

10807 "input_tokens_details": {

10808 "cached_tokens": 0,

10809 "cache_write_tokens": 0

10810 },

10811 "output_tokens": 52,

10812 "output_tokens_details": {

10813 "reasoning_tokens": 0

10814 },

10815 "total_tokens": 380

10816 },

10817 "tool_usage": {

10818 "image_gen": {

10819 "input_tokens": 0,

10820 "input_tokens_details": {

10821 "text_tokens": 0,

10822 "image_tokens": 0

10823 },

10824 "output_tokens": 0,

10825 "output_tokens_details": {

10826 "text_tokens": 0,

10827 "image_tokens": 0

10828 },

10829 "total_tokens": 0

10830 },

10831 "web_search": {

10832 "num_requests": 0

10833 }

10834 },

10835 "user": null,

10836 "metadata": {},

10837 "conversation": {

10838 "id": "id"

10839 },

10840 "image": {

10841 "context_compression": "enabled"

10842 },

10843 "input_transformations": [

10844 {

10845 "id": "id",

10846 "action": "removed",

10847 "reason": "organization_mismatch",

10848 "type": "reasoning"

10849 }

10850 ],

10851 "moderation": {

10852 "input": {

10853 "categories": {

10854 "foo": true

10855 },

10856 "category_applied_input_types": {

10857 "foo": [

10858 "text"

10859 ]

10860 },

10861 "category_scores": {

10862 "foo": 0

10863 },

10864 "flagged": true,

10865 "model": "model",

10866 "type": "moderation_result"

10867 },

10868 "output": {

10869 "categories": {

10870 "foo": true

10871 },

10872 "category_applied_input_types": {

10873 "foo": [

10874 "text"

10875 ]

10876 },

10877 "category_scores": {

10878 "foo": 0

10879 },

10880 "flagged": true,

10881 "model": "model",

10882 "type": "moderation_result"

10883 }

10884 },

10885 "output_text": "output_text",

10886 "prompt_cache_diagnostics": {

10887 "cache_missed_tokens": 0,

10888 "reason": "model_changed",

10889 "type": "cache_miss",

10890 "comparison_reusable_tokens": 0

10891 },

10892 "prompt_cache_options": {

10893 "mode": "implicit",

10894 "ttl": "30m",

10895 "comparison_response_id": "comparison_response_id"

10896 },

10897 "service_tier": "auto"

10898}

10899```

10900 

10901### Example

10902 

10903```http10751```http

10904curl https://api.openai.com/v1/responses/resp_123 \10752curl https://api.openai.com/v1/responses/resp_123 \

10905 -H "Content-Type: application/json" \10753 -H "Content-Type: application/json" \


10920 "incomplete_details": null,10768 "incomplete_details": null,

10921 "instructions": null,10769 "instructions": null,

10922 "max_output_tokens": null,10770 "max_output_tokens": null,

10923 "model": "gpt-6-astra",10771 "model": "gpt-6.2-astra",

10924 "output": [10772 "output": [

10925 {10773 {

10926 "type": "message",10774 "type": "message",

Details

4700 4700 

4701### Example4701### Example

4702 4702 

4703```http

4704curl https://api.openai.com/v1/responses/$RESPONSE_ID/input_items \

4705 -H "Authorization: Bearer $OPENAI_API_KEY"

4706```

4707 

4708#### 200 — Example

4709 

4710```json

4711{

4712 "data": [

4713 {

4714 "id": "id",

4715 "content": [

4716 {

4717 "text": "text",

4718 "type": "input_text",

4719 "prompt_cache_breakpoint": {

4720 "mode": "explicit",

4721 "ttl": "30m"

4722 }

4723 }

4724 ],

4725 "role": "user",

4726 "type": "message",

4727 "status": "in_progress"

4728 }

4729 ],

4730 "first_id": "first_id",

4731 "has_more": true,

4732 "last_id": "last_id",

4733 "object": "list"

4734}

4735```

4736 

4737### Example

4738 

4739```http4703```http

4740curl https://api.openai.com/v1/responses/resp_abc123/input_items \4704curl https://api.openai.com/v1/responses/resp_abc123/input_items \

4741 -H "Content-Type: application/json" \4705 -H "Content-Type: application/json" \

Details

6176 6176 

6177### Example6177### Example

6178 6178 

6179```http

6180curl https://api.openai.com/v1/responses/input_tokens \

6181 -X POST \

6182 -H "Authorization: Bearer $OPENAI_API_KEY"

6183```

6184 

6185#### 200 — Example

6186 

6187```json

6188{

6189 "input_tokens": 123,

6190 "object": "response.input_tokens"

6191}

6192```

6193 

6194### Example

6195 

6196```http6179```http

6197curl -X POST https://api.openai.com/v1/responses/input_tokens \6180curl -X POST https://api.openai.com/v1/responses/input_tokens \

6198 -H "Content-Type: application/json" \6181 -H "Content-Type: application/json" \

6199 -H "Authorization: Bearer $OPENAI_API_KEY" \6182 -H "Authorization: Bearer $OPENAI_API_KEY" \

6200 -d '{6183 -d '{

6201 "model": "gpt-6-astra",6184 "model": "gpt-6.2-astra",

6202 "input": "Tell me a joke."6185 "input": "Tell me a joke."

6203 }'6186 }'

6204```6187```

Details

58 58 

59### Example59### Example

60 60 

61```http

62curl https://api.openai.com/v1/safety/alerts/$ID \

63 -H "Authorization: Bearer $OPENAI_API_KEY"

64```

65 

66#### 200 — Example

67 

68```json

69{

70 "id": "id",

71 "created_at": 0,

72 "error_type": "potentially_unintended_data_transfer",

73 "model": "model",

74 "object": "safety.alert",

75 "reason": "reason",

76 "request_id": "request_id",

77 "request_paused": true,

78 "response_id": "response_id",

79 "detailed_explanation": "detailed_explanation"

80}

81```

82 

83### Example

84 

85```http61```http

86curl https://api.openai.com/v1/safety/alerts/alert_0123456789abcdef0123456789abcdef \62curl https://api.openai.com/v1/safety/alerts/alert_0123456789abcdef0123456789abcdef \

87 -H "Authorization: Bearer $OPENAI_API_KEY"63 -H "Authorization: Bearer $OPENAI_API_KEY"


96 "created_at": 1787659200,72 "created_at": 1787659200,

97 "request_id": "req_123",73 "request_id": "req_123",

98 "response_id": "resp_123",74 "response_id": "resp_123",

99 "model": "gpt-6-astra",75 "model": "gpt-6.2-astra",

100 "request_paused": true,76 "request_paused": true,

101 "error_type": "potentially_unintended_data_access",77 "error_type": "potentially_unintended_data_access",

102 "reason": "Potentially unintended data access."78 "reason": "Potentially unintended data access."

Details

42 42 

43### Example43### Example

44 44 

45```http

46curl https://api.openai.com/v1/safety/cases/$ID \

47 -H "Authorization: Bearer $OPENAI_API_KEY"

48```

49 

50#### 200 — Example

51 

52```json

53{

54 "id": "id",

55 "created_at": 0,

56 "entity_identifier": "entity_identifier",

57 "notice": {

58 "type": "warning"

59 },

60 "object": "safety.case",

61 "reason": "reason"

62}

63```

64 

65### Example

66 

67```http45```http

68curl https://api.openai.com/v1/safety/cases/C-abc123 \46curl https://api.openai.com/v1/safety/cases/C-abc123 \

69 -H "Authorization: Bearer $OPENAI_API_KEY"47 -H "Authorization: Bearer $OPENAI_API_KEY"

Details

138 138 

139### Example139### Example

140 140 

141```http

142curl https://api.openai.com/v1/uploads/$UPLOAD_ID/cancel \

143 -X POST \

144 -H "Authorization: Bearer $OPENAI_API_KEY"

145```

146 

147#### 200 — Example

148 

149```json

150{

151 "id": "id",

152 "bytes": 0,

153 "created_at": 0,

154 "expires_at": 0,

155 "filename": "filename",

156 "purpose": "purpose",

157 "status": "pending",

158 "file": {

159 "id": "id",

160 "bytes": 0,

161 "created_at": 0,

162 "filename": "filename",

163 "object": "file",

164 "purpose": "assistants",

165 "status": "uploaded",

166 "expires_at": 0,

167 "status_details": "status_details"

168 },

169 "object": "upload"

170}

171```

172 

173### Example

174 

175```http141```http

176curl https://api.openai.com/v1/uploads/upload_abc123/cancel142curl https://api.openai.com/v1/uploads/upload_abc123/cancel

177```143```

Details

155 155 

156### Example156### Example

157 157 

158```http

159curl https://api.openai.com/v1/uploads/$UPLOAD_ID/complete \

160 -H 'Content-Type: application/json' \

161 -H "Authorization: Bearer $OPENAI_API_KEY" \

162 -d '{

163 "part_ids": [

164 "string"

165 ]

166 }'

167```

168 

169#### 200 — Example

170 

171```json

172{

173 "id": "id",

174 "bytes": 0,

175 "created_at": 0,

176 "expires_at": 0,

177 "filename": "filename",

178 "purpose": "purpose",

179 "status": "pending",

180 "file": {

181 "id": "id",

182 "bytes": 0,

183 "created_at": 0,

184 "filename": "filename",

185 "object": "file",

186 "purpose": "assistants",

187 "status": "uploaded",

188 "expires_at": 0,

189 "status_details": "status_details"

190 },

191 "object": "upload"

192}

193```

194 

195### Example

196 

197```http158```http

198curl https://api.openai.com/v1/uploads/upload_abc123/complete159curl https://api.openai.com/v1/uploads/upload_abc123/complete

199 -d '{160 -d '{

Details

198 198 

199### Example199### Example

200 200 

201```http

202curl https://api.openai.com/v1/uploads \

203 -H 'Content-Type: application/json' \

204 -H "Authorization: Bearer $OPENAI_API_KEY" \

205 -d '{

206 "bytes": 0,

207 "filename": "filename",

208 "mime_type": "mime_type",

209 "purpose": "assistants"

210 }'

211```

212 

213#### 200 — Example

214 

215```json

216{

217 "id": "id",

218 "bytes": 0,

219 "created_at": 0,

220 "expires_at": 0,

221 "filename": "filename",

222 "purpose": "purpose",

223 "status": "pending",

224 "file": {

225 "id": "id",

226 "bytes": 0,

227 "created_at": 0,

228 "filename": "filename",

229 "object": "file",

230 "purpose": "assistants",

231 "status": "uploaded",

232 "expires_at": 0,

233 "status_details": "status_details"

234 },

235 "object": "upload"

236}

237```

238 

239### Example

240 

241```http201```http

242curl https://api.openai.com/v1/uploads \202curl https://api.openai.com/v1/uploads \

243 -H "Authorization: Bearer $OPENAI_API_KEY" \203 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

52 52 

53### Example53### Example

54 54 

55```http

56curl https://api.openai.com/v1/uploads/$UPLOAD_ID/parts \

57 -H 'Content-Type: multipart/form-data' \

58 -H "Authorization: Bearer $OPENAI_API_KEY" \

59 -F 'data=@/path/to/data'

60```

61 

62#### 200 — Example

63 

64```json

65{

66 "id": "id",

67 "created_at": 0,

68 "object": "upload.part",

69 "upload_id": "upload_id"

70}

71```

72 

73### Example

74 

75```http55```http

76curl https://api.openai.com/v1/uploads/upload_abc123/parts56curl https://api.openai.com/v1/uploads/upload_abc123/parts

77 -F data="aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS91cGxvYWRz..."57 -F data="aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS91cGxvYWRz..."

Details

188 188 

189### Example189### Example

190 190 

191```http

192curl https://api.openai.com/v1/vector_stores \

193 -H 'Content-Type: application/json' \

194 -H 'OpenAI-Beta: assistants=v2' \

195 -H "Authorization: Bearer $OPENAI_API_KEY" \

196 -d '{}'

197```

198 

199#### 200 — Example

200 

201```json

202{

203 "id": "id",

204 "created_at": 0,

205 "file_counts": {

206 "cancelled": 0,

207 "completed": 0,

208 "failed": 0,

209 "in_progress": 0,

210 "total": 0

211 },

212 "last_active_at": 0,

213 "metadata": {

214 "foo": "string"

215 },

216 "name": "name",

217 "object": "vector_store",

218 "status": "expired",

219 "usage_bytes": 0,

220 "expires_after": {

221 "anchor": "last_active_at",

222 "days": 1

223 },

224 "expires_at": 0

225}

226```

227 

228### Example

229 

230```http191```http

231curl https://api.openai.com/v1/vector_stores \192curl https://api.openai.com/v1/vector_stores \

232 -H "Authorization: Bearer $OPENAI_API_KEY" \193 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

26 26 

27### Example27### Example

28 28 

29```http

30curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID \

31 -X DELETE \

32 -H 'OpenAI-Beta: assistants=v2' \

33 -H "Authorization: Bearer $OPENAI_API_KEY"

34```

35 

36#### 200 — Example

37 

38```json

39{

40 "id": "id",

41 "deleted": true,

42 "object": "vector_store.deleted"

43}

44```

45 

46### Example

47 

48```http29```http

49curl https://api.openai.com/v1/vector_stores/vs_abc123 \30curl https://api.openai.com/v1/vector_stores/vs_abc123 \

50 -H "Authorization: Bearer $OPENAI_API_KEY" \31 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

135 135 

136### Example136### Example

137 137 

138```http

139curl https://api.openai.com/v1/vector_stores \

140 -H 'OpenAI-Beta: assistants=v2' \

141 -H "Authorization: Bearer $OPENAI_API_KEY"

142```

143 

144#### 200 — Example

145 

146```json

147{

148 "data": [

149 {

150 "id": "id",

151 "created_at": 0,

152 "file_counts": {

153 "cancelled": 0,

154 "completed": 0,

155 "failed": 0,

156 "in_progress": 0,

157 "total": 0

158 },

159 "last_active_at": 0,

160 "metadata": {

161 "foo": "string"

162 },

163 "name": "name",

164 "object": "vector_store",

165 "status": "expired",

166 "usage_bytes": 0,

167 "expires_after": {

168 "anchor": "last_active_at",

169 "days": 1

170 },

171 "expires_at": 0

172 }

173 ],

174 "first_id": "vs_abc123",

175 "has_more": false,

176 "last_id": "vs_abc456",

177 "object": "list"

178}

179```

180 

181### Example

182 

183```http138```http

184curl https://api.openai.com/v1/vector_stores \139curl https://api.openai.com/v1/vector_stores \

185 -H "Authorization: Bearer $OPENAI_API_KEY" \140 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

113 113 

114### Example114### Example

115 115 

116```http

117curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID \

118 -H 'OpenAI-Beta: assistants=v2' \

119 -H "Authorization: Bearer $OPENAI_API_KEY"

120```

121 

122#### 200 — Example

123 

124```json

125{

126 "id": "id",

127 "created_at": 0,

128 "file_counts": {

129 "cancelled": 0,

130 "completed": 0,

131 "failed": 0,

132 "in_progress": 0,

133 "total": 0

134 },

135 "last_active_at": 0,

136 "metadata": {

137 "foo": "string"

138 },

139 "name": "name",

140 "object": "vector_store",

141 "status": "expired",

142 "usage_bytes": 0,

143 "expires_after": {

144 "anchor": "last_active_at",

145 "days": 1

146 },

147 "expires_at": 0

148}

149```

150 

151### Example

152 

153```http116```http

154curl https://api.openai.com/v1/vector_stores/vs_abc123 \117curl https://api.openai.com/v1/vector_stores/vs_abc123 \

155 -H "Authorization: Bearer $OPENAI_API_KEY" \118 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

201 201 

202### Example202### Example

203 203 

204```http

205curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/search \

206 -H 'Content-Type: application/json' \

207 -H 'OpenAI-Beta: assistants=v2' \

208 -H "Authorization: Bearer $OPENAI_API_KEY" \

209 -d '{

210 "query": "string"

211 }'

212```

213 

214#### 200 — Example

215 

216```json

217{

218 "data": [

219 {

220 "attributes": {

221 "foo": "string"

222 },

223 "content": [

224 {

225 "text": "text",

226 "type": "text"

227 }

228 ],

229 "file_id": "file_id",

230 "filename": "filename",

231 "score": 0

232 }

233 ],

234 "has_more": true,

235 "next_page": "next_page",

236 "object": "vector_store.search_results.page",

237 "search_query": [

238 "string"

239 ]

240}

241```

242 

243### Example

244 

245```http204```http

246curl -X POST \205curl -X POST \

247https://api.openai.com/v1/vector_stores/vs_abc123/search \206https://api.openai.com/v1/vector_stores/vs_abc123/search \

Details

146 146 

147### Example147### Example

148 148 

149```http

150curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID \

151 -H 'Content-Type: application/json' \

152 -H 'OpenAI-Beta: assistants=v2' \

153 -H "Authorization: Bearer $OPENAI_API_KEY" \

154 -d '{}'

155```

156 

157#### 200 — Example

158 

159```json

160{

161 "id": "id",

162 "created_at": 0,

163 "file_counts": {

164 "cancelled": 0,

165 "completed": 0,

166 "failed": 0,

167 "in_progress": 0,

168 "total": 0

169 },

170 "last_active_at": 0,

171 "metadata": {

172 "foo": "string"

173 },

174 "name": "name",

175 "object": "vector_store",

176 "status": "expired",

177 "usage_bytes": 0,

178 "expires_after": {

179 "anchor": "last_active_at",

180 "days": 1

181 },

182 "expires_at": 0

183}

184```

185 

186### Example

187 

188```http149```http

189curl https://api.openai.com/v1/vector_stores/vs_abc123 \150curl https://api.openai.com/v1/vector_stores/vs_abc123 \

190 -H "Authorization: Bearer $OPENAI_API_KEY" \151 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/file_batches/$BATCH_ID/cancel \

83 -X POST \

84 -H 'OpenAI-Beta: assistants=v2' \

85 -H "Authorization: Bearer $OPENAI_API_KEY"

86```

87 

88#### 200 — Example

89 

90```json

91{

92 "id": "id",

93 "created_at": 0,

94 "file_counts": {

95 "cancelled": 0,

96 "completed": 0,

97 "failed": 0,

98 "in_progress": 0,

99 "total": 0

100 },

101 "object": "vector_store.file_batch",

102 "status": "in_progress",

103 "vector_store_id": "vector_store_id"

104}

105```

106 

107### Example

108 

109```http81```http

110curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/cancel \82curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/cancel \

111 -H "Authorization: Bearer $OPENAI_API_KEY" \83 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

168 168 

169### Example169### Example

170 170 

171```http

172curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/file_batches \

173 -H 'Content-Type: application/json' \

174 -H 'OpenAI-Beta: assistants=v2' \

175 -H "Authorization: Bearer $OPENAI_API_KEY" \

176 -d '{

177 "file_ids": [

178 "string"

179 ]

180 }'

181```

182 

183#### 200 — Example

184 

185```json

186{

187 "id": "id",

188 "created_at": 0,

189 "file_counts": {

190 "cancelled": 0,

191 "completed": 0,

192 "failed": 0,

193 "in_progress": 0,

194 "total": 0

195 },

196 "object": "vector_store.file_batch",

197 "status": "in_progress",

198 "vector_store_id": "vector_store_id"

199}

200```

201 

202### Example

203 

204```http171```http

205curl https://api.openai.com/v1/vector_stores/vs_abc123/file_batches \172curl https://api.openai.com/v1/vector_stores/vs_abc123/file_batches \

206 -H "Authorization: Bearer $OPENAI_API_KEY" \173 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

170 170 

171### Example171### Example

172 172 

173```http

174curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/file_batches/$BATCH_ID/files \

175 -H 'OpenAI-Beta: assistants=v2' \

176 -H "Authorization: Bearer $OPENAI_API_KEY"

177```

178 

179#### 200 — Example

180 

181```json

182{

183 "data": [

184 {

185 "id": "id",

186 "created_at": 0,

187 "last_error": {

188 "code": "server_error",

189 "message": "message"

190 },

191 "object": "vector_store.file",

192 "status": "in_progress",

193 "usage_bytes": 0,

194 "vector_store_id": "vector_store_id",

195 "attributes": {

196 "foo": "string"

197 },

198 "chunking_strategy": {

199 "static": {

200 "chunk_overlap_tokens": 0,

201 "max_chunk_size_tokens": 100

202 },

203 "type": "static"

204 }

205 }

206 ],

207 "first_id": "file-abc123",

208 "has_more": false,

209 "last_id": "file-abc456",

210 "object": "list"

211}

212```

213 

214### Example

215 

216```http173```http

217curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/files \174curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/files \

218 -H "Authorization: Bearer $OPENAI_API_KEY" \175 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

78 78 

79### Example79### Example

80 80 

81```http

82curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/file_batches/$BATCH_ID \

83 -H 'OpenAI-Beta: assistants=v2' \

84 -H "Authorization: Bearer $OPENAI_API_KEY"

85```

86 

87#### 200 — Example

88 

89```json

90{

91 "id": "id",

92 "created_at": 0,

93 "file_counts": {

94 "cancelled": 0,

95 "completed": 0,

96 "failed": 0,

97 "in_progress": 0,

98 "total": 0

99 },

100 "object": "vector_store.file_batch",

101 "status": "in_progress",

102 "vector_store_id": "vector_store_id"

103}

104```

105 

106### Example

107 

108```http81```http

109curl https://api.openai.com/v1/vector_stores/vs_abc123/file_batches/vsfb_abc123 \82curl https://api.openai.com/v1/vector_stores/vs_abc123/file_batches/vsfb_abc123 \

110 -H "Authorization: Bearer $OPENAI_API_KEY" \83 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

46 46 

47### Example47### Example

48 48 

49```http

50curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files/$FILE_ID/content \

51 -H 'OpenAI-Beta: assistants=v2' \

52 -H "Authorization: Bearer $OPENAI_API_KEY"

53```

54 

55#### 200 — Example

56 

57```json

58{

59 "data": [

60 {

61 "text": "text",

62 "type": "type"

63 }

64 ],

65 "has_more": true,

66 "next_page": "next_page",

67 "object": "vector_store.file_content.page"

68}

69```

70 

71### Example

72 

73```http49```http

74curl \50curl \

75https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123/content \51https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123/content \

Details

188 188 

189### Example189### Example

190 190 

191```http

192curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files \

193 -H 'Content-Type: application/json' \

194 -H 'OpenAI-Beta: assistants=v2' \

195 -H "Authorization: Bearer $OPENAI_API_KEY" \

196 -d '{

197 "file_id": "file_id"

198 }'

199```

200 

201#### 200 — Example

202 

203```json

204{

205 "id": "id",

206 "created_at": 0,

207 "last_error": {

208 "code": "server_error",

209 "message": "message"

210 },

211 "object": "vector_store.file",

212 "status": "in_progress",

213 "usage_bytes": 0,

214 "vector_store_id": "vector_store_id",

215 "attributes": {

216 "foo": "string"

217 },

218 "chunking_strategy": {

219 "static": {

220 "chunk_overlap_tokens": 0,

221 "max_chunk_size_tokens": 100

222 },

223 "type": "static"

224 }

225}

226```

227 

228### Example

229 

230```http191```http

231curl https://api.openai.com/v1/vector_stores/vs_abc123/files \192curl https://api.openai.com/v1/vector_stores/vs_abc123/files \

232 -H "Authorization: Bearer $OPENAI_API_KEY" \193 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

30 30 

31### Example31### Example

32 32 

33```http

34curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files/$FILE_ID \

35 -X DELETE \

36 -H 'OpenAI-Beta: assistants=v2' \

37 -H "Authorization: Bearer $OPENAI_API_KEY"

38```

39 

40#### 200 — Example

41 

42```json

43{

44 "id": "id",

45 "deleted": true,

46 "object": "vector_store.file.deleted"

47}

48```

49 

50### Example

51 

52```http33```http

53curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \34curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \

54 -H "Authorization: Bearer $OPENAI_API_KEY" \35 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

166 166 

167### Example167### Example

168 168 

169```http

170curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files \

171 -H 'OpenAI-Beta: assistants=v2' \

172 -H "Authorization: Bearer $OPENAI_API_KEY"

173```

174 

175#### 200 — Example

176 

177```json

178{

179 "data": [

180 {

181 "id": "id",

182 "created_at": 0,

183 "last_error": {

184 "code": "server_error",

185 "message": "message"

186 },

187 "object": "vector_store.file",

188 "status": "in_progress",

189 "usage_bytes": 0,

190 "vector_store_id": "vector_store_id",

191 "attributes": {

192 "foo": "string"

193 },

194 "chunking_strategy": {

195 "static": {

196 "chunk_overlap_tokens": 0,

197 "max_chunk_size_tokens": 100

198 },

199 "type": "static"

200 }

201 }

202 ],

203 "first_id": "file-abc123",

204 "has_more": false,

205 "last_id": "file-abc456",

206 "object": "list"

207}

208```

209 

210### Example

211 

212```http169```http

213curl https://api.openai.com/v1/vector_stores/vs_abc123/files \170curl https://api.openai.com/v1/vector_stores/vs_abc123/files \

214 -H "Authorization: Bearer $OPENAI_API_KEY" \171 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

130 130 

131### Example131### Example

132 132 

133```http

134curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files/$FILE_ID \

135 -H 'OpenAI-Beta: assistants=v2' \

136 -H "Authorization: Bearer $OPENAI_API_KEY"

137```

138 

139#### 200 — Example

140 

141```json

142{

143 "id": "id",

144 "created_at": 0,

145 "last_error": {

146 "code": "server_error",

147 "message": "message"

148 },

149 "object": "vector_store.file",

150 "status": "in_progress",

151 "usage_bytes": 0,

152 "vector_store_id": "vector_store_id",

153 "attributes": {

154 "foo": "string"

155 },

156 "chunking_strategy": {

157 "static": {

158 "chunk_overlap_tokens": 0,

159 "max_chunk_size_tokens": 100

160 },

161 "type": "static"

162 }

163}

164```

165 

166### Example

167 

168```http133```http

169curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \134curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \

170 -H "Authorization: Bearer $OPENAI_API_KEY" \135 -H "Authorization: Bearer $OPENAI_API_KEY" \

Details

150 150 

151### Example151### Example

152 152 

153```http

154curl https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files/$FILE_ID \

155 -H 'Content-Type: application/json' \

156 -H 'OpenAI-Beta: assistants=v2' \

157 -H "Authorization: Bearer $OPENAI_API_KEY" \

158 -d '{

159 "attributes": {

160 "foo": "string"

161 }

162 }'

163```

164 

165#### 200 — Example

166 

167```json

168{

169 "id": "id",

170 "created_at": 0,

171 "last_error": {

172 "code": "server_error",

173 "message": "message"

174 },

175 "object": "vector_store.file",

176 "status": "in_progress",

177 "usage_bytes": 0,

178 "vector_store_id": "vector_store_id",

179 "attributes": {

180 "foo": "string"

181 },

182 "chunking_strategy": {

183 "static": {

184 "chunk_overlap_tokens": 0,

185 "max_chunk_size_tokens": 100

186 },

187 "type": "static"

188 }

189}

190```

191 

192### Example

193 

194```http153```http

195curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \154curl https://api.openai.com/v1/vector_stores/vs_abc123/files/file-abc123 \

196 -H "Authorization: Bearer $OPENAI_API_KEY" \155 -H "Authorization: Bearer $OPENAI_API_KEY" \