|
1993 | 1993 | "content": { |
1994 | 1994 | "application/json": { |
1995 | 1995 | "schema": { |
1996 | | - "type": "object", |
1997 | | - "properties": { |
1998 | | - "character_count": { |
1999 | | - "description": "Characters translated so far in the current billing period.", |
2000 | | - "type": "integer", |
2001 | | - "format": "int64", |
2002 | | - "example": 180118 |
2003 | | - }, |
2004 | | - "character_limit": { |
2005 | | - "description": "Current maximum number of characters that can be translated per billing period. If cost control is set, the cost control limit will be returned in this field.", |
2006 | | - "type": "integer", |
2007 | | - "format": "int64", |
2008 | | - "example": 1250000 |
| 1996 | + "$ref": "#/components/schemas/UsageResponse" |
| 1997 | + }, |
| 1998 | + "examples": { |
| 1999 | + "free": { |
| 2000 | + "summary": "Response for API users not on the Pro plan", |
| 2001 | + "value": { |
| 2002 | + "character_count": 180118, |
| 2003 | + "character_limit": 1250000 |
| 2004 | + } |
| 2005 | + }, |
| 2006 | + "pro": { |
| 2007 | + "summary": "Response for API Pro users", |
| 2008 | + "value": { |
| 2009 | + "character_count": 5947223, |
| 2010 | + "character_limit": 1000000000000, |
| 2011 | + "products": [ |
| 2012 | + { |
| 2013 | + "product_type": "write", |
| 2014 | + "api_key_character_count": 0, |
| 2015 | + "character_count": 5643 |
| 2016 | + }, |
| 2017 | + { |
| 2018 | + "product_type": "translate", |
| 2019 | + "api_key_character_count": 636, |
| 2020 | + "character_count": 5941580 |
| 2021 | + } |
| 2022 | + ], |
| 2023 | + "api_key_character_count": 636, |
| 2024 | + "api_key_character_limit": 1000000000000, |
| 2025 | + "start_time": "2025-05-13T09:18:42Z", |
| 2026 | + "end_time": "2025-06-13T09:18:42Z" |
2009 | 2027 | } |
2010 | 2028 | } |
2011 | 2029 | } |
|
2045 | 2063 | "auth_header": [] |
2046 | 2064 | } |
2047 | 2065 | ] |
| 2066 | + }, |
| 2067 | + "UsageResponse": { |
| 2068 | + "type": "object", |
| 2069 | + "properties": { |
| 2070 | + "character_count": { |
| 2071 | + "description": "Characters translated so far in the current billing period.", |
| 2072 | + "type": "integer", |
| 2073 | + "format": "int64", |
| 2074 | + "example": 180118 |
| 2075 | + }, |
| 2076 | + "character_limit": { |
| 2077 | + "description": "Current maximum number of characters that can be translated per billing period. If cost control is set, the cost control limit will be returned in this field.", |
| 2078 | + "type": "integer", |
| 2079 | + "format": "int64", |
| 2080 | + "example": 1250000 |
| 2081 | + }, |
| 2082 | + "products": { |
| 2083 | + "type": "array", |
| 2084 | + "description": "Only present for API Pro users. Per-product usage details.", |
| 2085 | + "items": { |
| 2086 | + "type": "object", |
| 2087 | + "properties": { |
| 2088 | + "product_type": { |
| 2089 | + "type": "string", |
| 2090 | + "description": "The type of product (e.g., 'write', 'translate').", |
| 2091 | + "example": "write" |
| 2092 | + }, |
| 2093 | + "api_key_character_count": { |
| 2094 | + "type": "integer", |
| 2095 | + "description": "Characters used for this product by this API key in the current period.", |
| 2096 | + "example": 0 |
| 2097 | + }, |
| 2098 | + "character_count": { |
| 2099 | + "type": "integer", |
| 2100 | + "description": "Total characters used for this product in the current period.", |
| 2101 | + "example": 5643 |
| 2102 | + } |
| 2103 | + } |
| 2104 | + } |
| 2105 | + }, |
| 2106 | + "api_key_character_count": { |
| 2107 | + "type": "integer", |
| 2108 | + "description": "Only present for API Pro users. Total characters used by this API key in the current period.", |
| 2109 | + "example": 636 |
| 2110 | + }, |
| 2111 | + "api_key_character_limit": { |
| 2112 | + "type": "integer", |
| 2113 | + "description": "Only present for API Pro users. Character limit for this API key in the current period.", |
| 2114 | + "example": 1000000000000 |
| 2115 | + }, |
| 2116 | + "start_time": { |
| 2117 | + "type": "string", |
| 2118 | + "format": "date-time", |
| 2119 | + "description": "Only present for API Pro users. Start time of the current billing period (ISO 8601).", |
| 2120 | + "example": "2025-05-13T09:18:42Z" |
| 2121 | + }, |
| 2122 | + "end_time": { |
| 2123 | + "type": "string", |
| 2124 | + "format": "date-time", |
| 2125 | + "description": "Only present for API Pro users. End time of the current billing period (ISO 8601).", |
| 2126 | + "example": "2025-06-13T09:18:42Z" |
| 2127 | + } |
| 2128 | + } |
2048 | 2129 | } |
2049 | 2130 | }, |
2050 | 2131 | "/v2/languages": { |
|
0 commit comments