{"id":130371,"date":"2026-10-01T15:38:25","date_gmt":"2026-10-01T08:38:25","guid":{"rendered":"https:\/\/tino.vn\/blog\/?p=130371"},"modified":"2026-10-01T15:42:40","modified_gmt":"2026-10-01T08:42:40","slug":"them-api-key-vao-traecode","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/them-api-key-vao-traecode\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e1ch th\u00eam API Key v\u00e0o TraeCode \u0111\u01a1n gi\u1ea3n cho ng\u01b0\u1eddi m\u1edbi"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u0110\u1ec3 c\u00e1ch th\u00eam API Key v\u00e0o TraeCode<\/strong>,<strong> b\u1ea1n ch\u1ec9 c\u1ea7n v\u00e0o Settings \u2192 Models \u2192 Add Model, ch\u1ecdn nh\u00e0 cung c\u1ea5p c\u00f3 s\u1eb5n ho\u1eb7c Custom Model, sau \u0111\u00f3 nh\u1eadp API Key, Model ID, \u0111\u1ecbnh d\u1ea1ng API v\u00e0 \u0111\u1ecba ch\u1ec9 Request URL. Sau khi l\u01b0u c\u1ea5u h\u00ecnh, model m\u1edbi s\u1ebd xu\u1ea5t hi\u1ec7n trong danh s\u00e1ch \u0111\u1ec3 b\u1ea1n ch\u1ecdn v\u00e0 s\u1eed d\u1ee5ng tr\u1ef1c ti\u1ebfp trong TraeCode. C\u1ea3 qu\u00e1 tr\u00ecnh m\u1ea5t kho\u1ea3ng 2-3 ph\u00fat. C\u00f9ng theo d\u00f5i b\u00e0i vi\u1ebft \u0111\u1ec3 bi\u1ebft c\u00e1ch th\u1ef1c hi\u1ec7n chi ti\u1ebft nh\u00e9!<\/strong><\/p>\n\n\n\n<h2 id=\"TraeCode_l\u00e0_g\u00ec_v\u00e0_khi_n\u00e0o_c\u1ea7n_k\u1ebft_n\u1ed1i_API?\"><strong>TraeCode l\u00e0 g\u00ec v\u00e0 khi n\u00e0o c\u1ea7n k\u1ebft n\u1ed1i API?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>TraeCode l\u00e0 m\u1ed9t m\u00f4i tr\u01b0\u1eddng ph\u00e1t tri\u1ec3n t\u00edch h\u1ee3p AI (AI IDE)<\/strong> h\u1ed7 tr\u1ee3 l\u1eadp tr\u00ecnh vi\u00ean vi\u1ebft code, s\u1eeda l\u1ed7i, gi\u1ea3i th\u00edch m\u00e3 ngu\u1ed3n v\u00e0 x\u00e2y d\u1ef1ng d\u1ef1 \u00e1n nhanh h\u01a1n b\u1eb1ng c\u00e1c m\u00f4 h\u00ecnh AI. IDE n\u00e0y do&nbsp; ByteDance ph\u00e1t tri\u1ec3n, c\u00f3 kh\u1ea3 n\u0103ng t\u00edch h\u1ee3p tr\u1ee3 l\u00fd AI tr\u1ef1c ti\u1ebfp v\u00e0o quy tr\u00ecnh l\u1eadp tr\u00ecnh, cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng trao \u0111\u1ed5i b\u1eb1ng ng\u00f4n ng\u1eef t\u1ef1 nhi\u00ean, t\u1ea1o ho\u1eb7c ch\u1ec9nh s\u1eeda nhi\u1ec1u file v\u00e0 k\u1ebft n\u1ed1i th\u00eam c\u00e1c model b\u00ean ngo\u00e0i th\u00f4ng qua API. Nh\u1edd \u0111\u00f3, Trae ph\u00f9 h\u1ee3p c\u1ea3 v\u1edbi l\u1eadp tr\u00ecnh vi\u00ean chuy\u00ean nghi\u1ec7p l\u1eabn ng\u01b0\u1eddi m\u1edbi mu\u1ed1n ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng v\u1edbi s\u1ef1 h\u1ed7 tr\u1ee3 c\u1ee7a AI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Khi n\u00f3i &#8220;k\u1ebft n\u1ed1i Trae API&#8221;, ng\u01b0\u1eddi d\u00f9ng th\u01b0\u1eddng mu\u1ed1n \u0111\u01b0a API key c\u1ee7a m\u1ed9t nh\u00e0 cung c\u1ea5p AI v\u00e0o Trae \u0111\u1ec3 d\u00f9ng model ri\u00eang, thay cho danh s\u00e1ch model c\u00f3 s\u1eb5n. Trae kh\u00f4ng b\u00e1n m\u1ed9t API ri\u00eang cho b\u1ea1n g\u1ecdi t\u1eeb b\u00ean ngo\u00e0i.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-1-1.png\" alt=\"TraeCode l\u00e0 g\u00ec \" class=\"wp-image-130382\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-1-1.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-1-1-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>TraeCode l\u00e0 g\u00ec<\/strong>?<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">B\u1ea1n n\u00ean k\u1ebft n\u1ed1i khi:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Model c\u00f3 s\u1eb5n trong Trae ch\u01b0a \u0111\u00e1p \u1ee9ng nhu c\u1ea7u. Trae cho ph\u00e9p th\u00eam model t\u00f9y ch\u1ec9nh theo hai c\u00e1ch: ch\u1ecdn nh\u00e0 cung c\u1ea5p c\u00f3 s\u1eb5n r\u1ed3i nh\u1eadp API key, ho\u1eb7c t\u1ef1 c\u1ea5u h\u00ecnh \u0111\u1ecbnh d\u1ea1ng API, \u0111\u01b0\u1eddng d\u1eabn y\u00eau c\u1ea7u, m\u00e3 model v\u00e0 th\u00f4ng tin x\u00e1c th\u1ef1c.<\/li>\n\n\n\n<li>B\u1ea1n \u0111\u00e3 c\u00f3 t\u00e0i kho\u1ea3n ho\u1eb7c g\u00f3i \u0111\u0103ng k\u00fd \u1edf nh\u00e0 cung c\u1ea5p kh\u00e1c v\u00e0 mu\u1ed1n t\u1eadn d\u1ee5ng h\u1ea1n m\u1ee9c s\u1eb5n c\u00f3.<\/li>\n\n\n\n<li>B\u1ea1n mu\u1ed1n t\u1ef1 ki\u1ec3m so\u00e1t chi ph\u00ed theo t\u1eebng nh\u00e0 cung c\u1ea5p.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Xem th\u00eam:<\/strong> <a href=\"https:\/\/tino.vn\/blog\/nen-tang-tong-hop-api-model-ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">Top 10+ n\u1ec1n t\u1ea3ng t\u1ed5ng h\u1ee3p API model AI<\/a><\/p>\n\n\n\n<h2 id=\"C\u1ea7n_chu\u1ea9n_b\u1ecb_g\u00ec_tr\u01b0\u1edbc_khi_k\u1ebft_n\u1ed1i_API_v\u1edbi_TreaCode?\"><strong>C\u1ea7n chu\u1ea9n b\u1ecb g\u00ec tr\u01b0\u1edbc khi k\u1ebft n\u1ed1i API v\u1edbi TreaCode?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Tr\u01b0\u1edbc khi c\u1ea5u h\u00ecnh, b\u1ea1n n\u00ean chu\u1ea9n b\u1ecb b\u1ed1n th\u00f4ng tin quan tr\u1ecdng:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>API Key:<\/strong> kh\u00f3a x\u00e1c th\u1ef1c do nh\u00e0 cung c\u1ea5p model c\u1ea5p.<\/li>\n\n\n\n<li><strong>API Endpoint ho\u1eb7c Base URL:<\/strong> \u0111\u1ecba ch\u1ec9 m\u00e0 TRAE s\u1ebd g\u1eedi request.<\/li>\n\n\n\n<li><strong>Model ID:<\/strong> t\u00ean ch\u00ednh x\u00e1c c\u1ee7a model c\u1ea7n s\u1eed d\u1ee5ng.<\/li>\n\n\n\n<li><strong>API Format:<\/strong> chu\u1ea9n giao ti\u1ebfp m\u00e0 d\u1ecbch v\u1ee5 h\u1ed7 tr\u1ee3.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5, m\u1ed9t d\u1ecbch v\u1ee5 t\u01b0\u01a1ng th\u00edch OpenAI c\u00f3 th\u1ec3 cung c\u1ea5p th\u00f4ng tin d\u1ea1ng:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>API Base URL: <\/strong>https:\/\/api.example.com\/v1<\/li>\n\n\n\n<li><strong>Model ID:<\/strong> example-model<\/li>\n\n\n\n<li><strong>API Key:<\/strong> sk-xxxxxxxx<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-2.png\" alt=\"C\u1ea7n chu\u1ea9n b\u1ecb g\u00ec tr\u01b0\u1edbc khi k\u1ebft n\u1ed1i API v\u1edbi TreaCode?\" class=\"wp-image-130383\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-2.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-2-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u1ea7n chu\u1ea9n b\u1ecb g\u00ec tr\u01b0\u1edbc khi k\u1ebft n\u1ed1i API v\u1edbi TreaCode?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>L\u01b0u \u00fd:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>T\u00ean Model ID<\/strong> ph\u1ea3i \u0111\u01b0\u1ee3c nh\u1eadp ch\u00ednh x\u00e1c theo t\u00e0i li\u1ec7u c\u1ee7a nh\u00e0 cung c\u1ea5p. Kh\u00f4ng n\u00ean t\u1ef1 suy \u0111o\u00e1n t\u00ean model d\u1ef1a tr\u00ean t\u00ean hi\u1ec3n th\u1ecb tr\u00ean website.<\/li>\n\n\n\n<li>Ngo\u00e0i ra, <strong>API Key th\u01b0\u1eddng \u0111\u01b0\u1ee3c t\u00ednh ph\u00ed v\u00e0 qu\u1ea3n l\u00fd ri\u00eang<\/strong> b\u1edfi nh\u00e0 cung c\u1ea5p model. G\u00f3i TRAE \u0111ang s\u1eed d\u1ee5ng kh\u00f4ng \u0111\u1ed3ng ngh\u0129a v\u1edbi vi\u1ec7c API c\u1ee7a OpenAI, Anthropic, OpenRouter ho\u1eb7c d\u1ecbch v\u1ee5 kh\u00e1c \u0111\u01b0\u1ee3c mi\u1ec5n ph\u00ed.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"H\u01b0\u1edbng_d\u1eabn_c\u00e1ch_th\u00eam_API_Key_v\u00e0o_TraeCode\"><strong>H\u01b0\u1edbng d\u1eabn c\u00e1ch <strong>th\u00eam API Key v\u00e0o TraeCode<\/strong><\/strong><\/h2>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1:_L\u1ea5y_API_Key_t\u1eeb_nh\u00e0_cung_c\u1ea5p_model\"><strong>B\u01b0\u1edbc 1: L\u1ea5y API Key t\u1eeb nh\u00e0 cung c\u1ea5p model<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tr\u01b0\u1edbc ti\u00ean, h\u00e3y truy c\u1eadp n\u1ec1n t\u1ea3ng cung c\u1ea5p model m\u00e0 b\u1ea1n mu\u1ed1n k\u1ebft n\u1ed1i.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>OpenAI<\/li>\n\n\n\n<li>Anthropic<\/li>\n\n\n\n<li>OpenRouter<\/li>\n\n\n\n<li>DeepSeek<\/li>\n\n\n\n<li>Kimi<\/li>\n\n\n\n<li>GLM<\/li>\n\n\n\n<li>m\u1ed9t d\u1ecbch v\u1ee5 API t\u01b0\u01a1ng th\u00edch OpenAI<\/li>\n\n\n\n<li>m\u1ed9t m\u00e1y ch\u1ee7 model n\u1ed9i b\u1ed9<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Sau \u0111\u00f3 t\u1ea1o API Key v\u00e0 l\u01b0u l\u1ea1i t\u1ea1i n\u01a1i an to\u00e0n.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2:_T\u1ea3i_ph\u1ea7n_m\u1ec1m_TraeCode_(n\u1ebfu_ch\u01b0a_c\u00f3)\"><strong>B\u01b0\u1edbc 2: T\u1ea3i ph\u1ea7n m\u1ec1m TraeCode (n\u1ebfu ch\u01b0a c\u00f3)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Truy c\u1eadp v\u00e0o <a href=\"https:\/\/www.trae.ai\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/www.trae.ai\/<\/a> v\u00e0 t\u1ea3i v\u1ec1 \u1ee9ng d\u1ee5ng TraeCode. Sau \u0111\u00f3, c\u00e0i \u0111\u1eb7t nh\u01b0 c\u00e1c ph\u1ea7n m\u1ec1m th\u00f4ng th\u01b0\u1eddng.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sau khi c\u00e0i \u0111\u1eb7t ho\u00e0n t\u1ea5t, m\u1edf TraeCode v\u00e0 \u0111\u0103ng nh\u1eadp t\u00e0i kho\u1ea3n.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3:_M\u1edf_ph\u1ea7n_qu\u1ea3n_l\u00fd_Model_trong_TraeCode\"><strong>B\u01b0\u1edbc 3: M\u1edf ph\u1ea7n qu\u1ea3n l\u00fd Model trong TraeCode<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Trong TraeCode, v\u00e0o <strong>Settings \u2192 Models \u2192<\/strong> ch\u1ecdn <strong>Add Model<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-1024x554.png\" alt=\"M\u1edf ph\u1ea7n qu\u1ea3n l\u00fd Model trong TraeCode\" class=\"wp-image-130379\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-1024x554.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-300x162.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-768x415.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-1536x830.png 1536w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5.png 1576w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>M\u1edf ph\u1ea7n qu\u1ea3n l\u00fd Model trong TraeCode<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"B\u01b0\u1edbc_4:_Ch\u1ecdn_nh\u00e0_cung_c\u1ea5p_ho\u1eb7c_Custom_Model\"><strong>B\u01b0\u1edbc 4: Ch\u1ecdn nh\u00e0 cung c\u1ea5p ho\u1eb7c Custom Model<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">TRAE cung c\u1ea5p hai c\u00e1ch th\u00eam model.<\/p>\n\n\n\n<h4 id=\"C\u00e1ch_1:_Ch\u1ecdn_nh\u00e0_cung_c\u1ea5p_c\u00f3_s\u1eb5n\"><strong>C\u00e1ch 1: Ch\u1ecdn nh\u00e0 cung c\u1ea5p c\u00f3 s\u1eb5n<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu d\u1ecbch v\u1ee5 b\u1ea1n s\u1eed d\u1ee5ng xu\u1ea5t hi\u1ec7n trong danh s\u00e1ch c\u1ee7a TRAE, h\u00e3y ch\u1ecdn tr\u1ef1c ti\u1ebfp nh\u00e0 cung c\u1ea5p \u0111\u00f3.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ti\u1ebfp theo b\u1ea1n ch\u1ec9 c\u1ea7n:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Ch\u1ecdn provider.<\/li>\n\n\n\n<li>Ch\u1ecdn model.<\/li>\n\n\n\n<li>Nh\u1eadp API Key.<\/li>\n\n\n\n<li>L\u01b0u c\u1ea5u h\u00ecnh.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00e2y l\u00e0 l\u1ef1a ch\u1ecdn \u0111\u01a1n gi\u1ea3n nh\u1ea5t cho ng\u01b0\u1eddi m\u1edbi.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"922\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6-1024x922.png\" alt=\"Ch\u1ecdn nh\u00e0 cung c\u1ea5p c\u00f3 s\u1eb5n\" class=\"wp-image-130378\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6-1024x922.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6-300x270.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6-768x691.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6.png 1071w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Ch\u1ecdn nh\u00e0 cung c\u1ea5p c\u00f3 s\u1eb5n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h4 id=\"C\u00e1ch_2:_Ch\u1ecdn_Custom_Model\"><strong>C\u00e1ch 2: Ch\u1ecdn Custom Model<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu nh\u00e0 cung c\u1ea5p kh\u00f4ng xu\u1ea5t hi\u1ec7n trong danh s\u00e1ch ho\u1eb7c b\u1ea1n \u0111ang s\u1eed d\u1ee5ng API proxy, API gateway, model self-hosted hay d\u1ecbch v\u1ee5 trung gian, h\u00e3y ch\u1ecdn <strong>Custom Model<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"681\" height=\"856\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_9.png\" alt=\"Ch\u1ecdn Custom Model\" class=\"wp-image-130376\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_9.png 681w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_9-239x300.png 239w\" sizes=\"(max-width: 681px) 100vw, 681px\" \/><figcaption class=\"wp-element-caption\"><strong>Ch\u1ecdn Custom Model<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">TraeCode cho ph\u00e9p t\u1ef1 c\u1ea5u h\u00ecnh API Format, Request URL, Model ID, t\u00ean hi\u1ec3n th\u1ecb v\u00e0 API Key. (tham kh\u1ea3o c\u00e1c b\u01b0\u1edbc ti\u1ebfp theo).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"689\" height=\"663\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10.png\" alt=\"Ch\u1ecdn Custom Model\" class=\"wp-image-130377\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10.png 689w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10-300x289.png 300w\" sizes=\"(max-width: 689px) 100vw, 689px\" \/><figcaption class=\"wp-element-caption\"><strong>Ch\u1ecdn Custom Model<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"B\u01b0\u1edbc_4:_Ch\u1ecdn_\u0111\u00fang_API_Format_(n\u1ebfu_Custom_API)\"><strong>B\u01b0\u1edbc 4: Ch\u1ecdn \u0111\u00fang API Format (n\u1ebfu Custom API)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00e2y l\u00e0 b\u01b0\u1edbc r\u1ea5t quan tr\u1ecdng. Theo t\u00e0i li\u1ec7u TraeCode hi\u1ec7n t\u1ea1i, Custom Model tr\u00ean b\u1ea3n th\u00f4ng th\u01b0\u1eddng h\u1ed7 tr\u1ee3 hai \u0111\u1ecbnh d\u1ea1ng ch\u00ednh.<\/p>\n\n\n\n<h4 id=\"OpenAI_Chat_Completions\"><strong>OpenAI Chat Completions<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Chu\u1ea9n endpoint ph\u1ed5 bi\u1ebfn: <strong>\/v1\/chat\/completions<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ph\u00f9 h\u1ee3p v\u1edbi nhi\u1ec1u d\u1ecbch v\u1ee5 nh\u01b0:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>OpenAI-compatible API<\/li>\n\n\n\n<li>OpenRouter<\/li>\n\n\n\n<li>DeepSeek<\/li>\n\n\n\n<li>Kimi<\/li>\n\n\n\n<li>GLM<\/li>\n\n\n\n<li>m\u1ed9t s\u1ed1 Ollama server<\/li>\n\n\n\n<li>API gateway t\u01b0\u01a1ng th\u00edch OpenAI<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"692\" height=\"665\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_11.png\" alt=\"Ch\u1ecdn \u0111\u00fang API Format \" class=\"wp-image-130375\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_11.png 692w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_11-300x288.png 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><figcaption class=\"wp-element-caption\"><strong>Ch\u1ecdn \u0111\u00fang API Format <\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h4 id=\"Anthropic_Messages\"><strong>Anthropic Messages<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Chu\u1ea9n endpoint: <strong>\/v1\/messages<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ph\u00f9 h\u1ee3p v\u1edbi:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Anthropic Claude<\/li>\n\n\n\n<li>API gateway h\u1ed7 tr\u1ee3 Anthropic Messages<\/li>\n\n\n\n<li>c\u00e1c d\u1ecbch v\u1ee5 proxy Claude t\u01b0\u01a1ng th\u00edch chu\u1ea9n Anthropic<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu nh\u00e0 cung c\u1ea5p h\u1ed7 tr\u1ee3 nhi\u1ec1u chu\u1ea9n, h\u00e3y \u01b0u ti\u00ean chu\u1ea9n \u0111\u01b0\u1ee3c h\u1ecd c\u00f4ng b\u1ed1 ch\u00ednh th\u1ee9c cho model \u0111ang s\u1eed d\u1ee5ng.<\/p>\n\n\n\n<h4 id=\"TRAE_c\u00f3_h\u1ed7_tr\u1ee3_OpenAI_Responses_API_kh\u00f4ng?\"><strong>TRAE c\u00f3 h\u1ed7 tr\u1ee3 OpenAI Responses API kh\u00f4ng?<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">T\u00e0i li\u1ec7u TraeCode d\u00e0nh cho ng\u01b0\u1eddi d\u00f9ng th\u00f4ng th\u01b0\u1eddng hi\u1ec7n li\u1ec7t k\u00ea <strong>OpenAI Chat Completions<\/strong> v\u00e0 <strong>Anthropic Messages<\/strong> cho Custom Model. Trong khi \u0111\u00f3, t\u00e0i li\u1ec7u TRAE Enterprise \u0111\u00e3 b\u1ed5 sung <strong>OpenAI Responses API<\/strong> <strong>\/v1\/responses<\/strong> b\u00ean c\u1ea1nh hai chu\u1ea9n tr\u00ean.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ec v\u1eady, h\u00e3y ki\u1ec3m tra tr\u1ef1c ti\u1ebfp danh s\u00e1ch <strong>API Format<\/strong> trong phi\u00ean b\u1ea3n TRAE \u0111ang s\u1eed d\u1ee5ng thay v\u00ec m\u1eb7c \u0111\u1ecbnh ch\u1ecdn Responses API.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_5:_Nh\u1eadp_Request_URL_(n\u1ebfu_Custom_API)\"><strong>B\u01b0\u1edbc 5: Nh\u1eadp Request URL (n\u1ebfu Custom API)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">TRAE hi\u1ec7n cung c\u1ea5p hai c\u00e1ch nh\u1eadp Request URL.<\/p>\n\n\n\n<h4 id=\"Tr\u01b0\u1eddng_h\u1ee3p_1:_B\u1eadt_Full_URL\"><strong>Tr\u01b0\u1eddng h\u1ee3p 1: B\u1eadt Full URL<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Khi b\u1eadt <strong>Full URL<\/strong>, b\u1ea1n c\u1ea7n nh\u1eadp to\u00e0n b\u1ed9 endpoint. V\u00ed d\u1ee5:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>V\u1edbi OpenAI-compatible API:<\/strong> https:\/\/api.example.com\/v1\/chat\/completions<\/li>\n\n\n\n<li><strong>V\u1edbi Anthropic-compatible API:<\/strong> https:\/\/api.example.com\/v1\/messages<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"694\" height=\"640\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12.png\" alt=\" Nh\u1eadp Request URL\" class=\"wp-image-130374\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12.png 694w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12-300x277.png 300w\" sizes=\"(max-width: 694px) 100vw, 694px\" \/><figcaption class=\"wp-element-caption\"><strong> Nh\u1eadp Request URL<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h4 id=\"Tr\u01b0\u1eddng_h\u1ee3p_2:_T\u1eaft_Full_URL\"><strong>Tr\u01b0\u1eddng h\u1ee3p 2: T\u1eaft Full URL<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea1n ch\u1ec9 nh\u1eadp \u0111\u1ecba ch\u1ec9 c\u01a1 s\u1edf. V\u00ed d\u1ee5: https:\/\/api.example.com\/v1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TraeCode s\u1ebd gh\u00e9p request path d\u1ef1a tr\u00ean API Format m\u00e0 b\u1ea1n \u0111\u00e3 ch\u1ecdn. \u0110\u00e2y l\u00e0 c\u01a1 ch\u1ebf \u0111\u01b0\u1ee3c t\u00e0i li\u1ec7u ch\u00ednh th\u1ee9c m\u00f4 t\u1ea3 cho Custom Model.<\/p>\n\n\n\n<h4 id=\"L\u01b0u_\u00fd_quan_tr\u1ecdng\"><strong>L\u01b0u \u00fd quan tr\u1ecdng<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00e2y c\u0169ng l\u00e0 m\u1ed9t trong nh\u1eefng v\u1ecb tr\u00ed d\u1ec5 c\u1ea5u h\u00ecnh sai nh\u1ea5t.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu nh\u00e0 cung c\u1ea5p y\u00eau c\u1ea7u <strong>https:\/\/api.example.com\/v1\/chat\/completions<\/strong> nh\u01b0ng b\u1ea1n b\u1eadt Full URL r\u1ed3i ch\u1ec9 nh\u1eadp <strong>https:\/\/api.example.com\/v1,<\/strong> request c\u00f3 th\u1ec3 kh\u00f4ng \u0111i \u0111\u1ebfn \u0111\u00fang endpoint.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ng\u01b0\u1ee3c l\u1ea1i, khi TRAE \u0111ang t\u1ef1 gh\u00e9p endpoint, vi\u1ec7c nh\u1eadp th\u00eam \/chat\/completions m\u1ed9t l\u1ea7n n\u1eefa c\u0169ng c\u00f3 th\u1ec3 t\u1ea1o \u0111\u01b0\u1eddng d\u1eabn sai.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do \u0111\u00f3, c\u1ea7n ki\u1ec3m tra tr\u1ea1ng th\u00e1i <strong>Full URL<\/strong> tr\u01b0\u1edbc khi \u0111i\u1ec1n \u0111\u1ecba ch\u1ec9.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_6:_Nh\u1eadp_Model_ID_v\u00e0_API_Key\"><strong>B\u01b0\u1edbc 6: Nh\u1eadp Model ID v\u00e0 API Key<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ti\u1ebfp theo, nh\u1eadp <strong>Model ID<\/strong>. v\u00e0 <strong>API Key<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TraeCode c\u0169ng cho ph\u00e9p \u0111\u1eb7t <strong>Model Display Name<\/strong> \u0111\u1ec3 d\u1ec5 nh\u1eadn bi\u1ebft model trong danh s\u00e1ch. N\u1ebfu b\u1ecf tr\u1ed1ng, h\u1ec7 th\u1ed1ng c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng Model ID l\u00e0m t\u00ean hi\u1ec3n th\u1ecb.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">T\u00ean hi\u1ec3n th\u1ecb ch\u1ec9 ph\u1ee5c v\u1ee5 vi\u1ec7c nh\u1eadn di\u1ec7n trong TRAE v\u00e0 kh\u00f4ng thay \u0111\u1ed5i Model ID \u0111\u01b0\u1ee3c g\u1eedi t\u1edbi API.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"698\" height=\"643\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13.png\" alt=\"Nh\u1eadp Model ID v\u00e0 API Key\" class=\"wp-image-130373\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13.png 698w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13-300x276.png 300w\" sizes=\"(max-width: 698px) 100vw, 698px\" \/><figcaption class=\"wp-element-caption\"><strong>Nh\u1eadp Model ID v\u00e0 API Key<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"B\u01b0\u1edbc_7:_L\u01b0u_v\u00e0_ki\u1ec3m_tra_k\u1ebft_n\u1ed1i\"><strong>B\u01b0\u1edbc 7: L\u01b0u v\u00e0 ki\u1ec3m tra k\u1ebft n\u1ed1i<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Nh\u1ea5n <strong>Add Mode<\/strong>l \u0111\u1ec3 l\u01b0u Custom Model. Sau khi ho\u00e0n t\u1ea5t:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Quay l\u1ea1i c\u1eeda s\u1ed5 chat.<\/li>\n\n\n\n<li>Nh\u1ea5n v\u00e0o t\u00ean model \u1edf g\u00f3c khu v\u1ef1c nh\u1eadp prompt.<\/li>\n\n\n\n<li>Ch\u1ecdn model v\u1eeba th\u00eam.<\/li>\n\n\n\n<li>G\u1eedi m\u1ed9t y\u00eau c\u1ea7u \u0111\u01a1n gi\u1ea3n \u0111\u1ec3 ki\u1ec3m tra.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">H\u00e3y t\u1ea1o m\u1ed9t file HTML hi\u1ec3n th\u1ecb d\u00f2ng ch\u1eef Hello World.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu model ph\u1ea3n h\u1ed3i b\u00ecnh th\u01b0\u1eddng, qu\u00e1 tr\u00ecnh k\u1ebft n\u1ed1i API v\u1edbi TRAE \u0111\u00e3 ho\u00e0n t\u1ea5t.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TraeCode cho ph\u00e9p b\u1eadt, t\u1eaft, ch\u1ec9nh s\u1eeda ho\u1eb7c x\u00f3a Custom Model sau khi th\u00eam.<\/p>\n\n\n\n<h2 id=\"C\u1ea5u_h\u00ecnh_n\u00e2ng_cao_cho_Custom_Model\"><strong>C\u1ea5u h\u00ecnh n\u00e2ng cao cho Custom Model<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ngo\u00e0i th\u00f4ng tin API c\u01a1 b\u1ea3n, TraeCode c\u00f2n cho ph\u00e9p thi\u1ebft l\u1eadp m\u1ed9t s\u1ed1 th\u00f4ng s\u1ed1 n\u00e2ng cao.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">T\u00f9y model v\u00e0 phi\u00ean b\u1ea3n, khu v\u1ef1c <strong>Advanced Settings<\/strong> c\u00f3 th\u1ec3 bao g\u1ed3m:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Model Series<\/li>\n\n\n\n<li>Context Window<\/li>\n\n\n\n<li>h\u1ed7 tr\u1ee3 image input<\/li>\n\n\n\n<li>Temperature<\/li>\n\n\n\n<li>Top P<\/li>\n\n\n\n<li>Top K<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Theo t\u00e0i li\u1ec7u TRAE, c\u1ea5u h\u00ecnh do ng\u01b0\u1eddi d\u00f9ng thi\u1ebft l\u1eadp cho context window, kh\u1ea3 n\u0103ng nh\u1eadn \u1ea3nh v\u00e0 m\u1ed9t s\u1ed1 sampling parameter s\u1ebd \u0111\u01b0\u1ee3c \u01b0u ti\u00ean.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"689\" height=\"860\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_14.png\" alt=\"\" class=\"wp-image-130372\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_14.png 689w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_14-240x300.png 240w\" sizes=\"(max-width: 689px) 100vw, 689px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u1ea5u h\u00ecnh n\u00e2ng cao cho Custom Model<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Ng\u01b0\u1eddi m\u1edbi kh\u00f4ng c\u1ea7n ch\u1ec9nh to\u00e0n b\u1ed9 th\u00f4ng s\u1ed1 ngay t\u1eeb \u0111\u1ea7u. C\u00e1ch an to\u00e0n h\u01a1n l\u00e0:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>K\u1ebft n\u1ed1i API th\u00e0nh c\u00f4ng tr\u01b0\u1edbc.<\/li>\n\n\n\n<li>Ki\u1ec3m tra model ph\u1ea3n h\u1ed3i b\u00ecnh th\u01b0\u1eddng.<\/li>\n\n\n\n<li>Sau \u0111\u00f3 m\u1edbi \u0111i\u1ec1u ch\u1ec9nh context window ho\u1eb7c sampling parameter khi c\u1ea7n.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu \u0111\u1eb7t context window cao h\u01a1n kh\u1ea3 n\u0103ng provider h\u1ed7 tr\u1ee3, request c\u00f3 th\u1ec3 th\u1ea5t b\u1ea1i ho\u1eb7c b\u1ecb gi\u1edbi h\u1ea1n b\u1edfi ph\u00eda API.<\/p>\n\n\n\n<h2 id=\"C\u00e1c_l\u1ed7i_th\u01b0\u1eddng_g\u1eb7p_khi_k\u1ebft_n\u1ed1i_TraeCode\"><strong>C\u00e1c l\u1ed7i th\u01b0\u1eddng g\u1eb7p khi k\u1ebft n\u1ed1i TraeCode<\/strong><\/h2>\n\n\n\n<h3 id=\"L\u1ed7i_401_Unauthorized\"><strong>L\u1ed7i 401 Unauthorized<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Nguy\u00ean nh\u00e2n th\u01b0\u1eddng g\u1eb7p:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API Key sai.<\/li>\n\n\n\n<li>API Key h\u1ebft hi\u1ec7u l\u1ef1c.<\/li>\n\n\n\n<li>Key b\u1ecb thu h\u1ed3i.<\/li>\n\n\n\n<li>Key kh\u00f4ng c\u00f3 quy\u1ec1n truy c\u1eadp model.<\/li>\n\n\n\n<li>Copy d\u01b0 kho\u1ea3ng tr\u1eafng.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">C\u00e1ch x\u1eed l\u00fd:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>T\u1ea1o API Key m\u1edbi.<\/li>\n\n\n\n<li>Copy l\u1ea1i key.<\/li>\n\n\n\n<li>Ki\u1ec3m tra quy\u1ec1n s\u1eed d\u1ee5ng model.<\/li>\n\n\n\n<li>Ki\u1ec3m tra t\u00e0i kho\u1ea3n API c\u00f2n ho\u1ea1t \u0111\u1ed9ng.<\/li>\n<\/ul>\n\n\n\n<h3 id=\"L\u1ed7i_404_Not_Found\"><strong>L\u1ed7i 404 Not Found<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">L\u1ed7i 404 th\u01b0\u1eddng li\u00ean quan \u0111\u1ebfn:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Request URL sai.<\/li>\n\n\n\n<li>Endpoint sai.<\/li>\n\n\n\n<li>Model ID kh\u00f4ng t\u1ed3n t\u1ea1i.<\/li>\n\n\n\n<li>TRAE gh\u00e9p th\u00eam path v\u00e0o URL kh\u00f4ng \u0111\u00fang.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">H\u00e3y ki\u1ec3m tra \u0111\u1eb7c bi\u1ec7t m\u1ee5c <strong>Full URL<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5, n\u1ebfu provider y\u00eau c\u1ea7u <strong>https:\/\/api.example.com\/v1\/chat\/completions<\/strong> h\u00e3y x\u00e1c \u0111\u1ecbnh TRAE \u0111ang c\u1ea7n Base URL hay Full URL tr\u01b0\u1edbc khi nh\u1eadp.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-3.png\" alt=\"C\u00e1c l\u1ed7i th\u01b0\u1eddng g\u1eb7p khi k\u1ebft n\u1ed1i TraeCode\" class=\"wp-image-130384\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-3.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-3-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong><strong>C\u00e1c l\u1ed7i th\u01b0\u1eddng g\u1eb7p khi k\u1ebft n\u1ed1i TraeCode<\/strong><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"L\u1ed7i_405_Method_Not_Allowed\"><strong>L\u1ed7i 405 Method Not Allowed<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">L\u1ed7i n\u00e0y th\u01b0\u1eddng xu\u1ea5t hi\u1ec7n khi request \u0111\u01b0\u1ee3c g\u1eedi \u0111\u1ebfn sai endpoint ho\u1eb7c endpoint kh\u00f4ng h\u1ed7 tr\u1ee3 ph\u01b0\u01a1ng th\u1ee9c request m\u00e0 client \u0111ang s\u1eed d\u1ee5ng.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">H\u00e3y ki\u1ec3m tra:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API Format.<\/li>\n\n\n\n<li>Full URL.<\/li>\n\n\n\n<li>endpoint \/chat\/completions.<\/li>\n\n\n\n<li>endpoint \/messages.<\/li>\n\n\n\n<li>h\u01b0\u1edbng d\u1eabn c\u1ee7a provider.<\/li>\n<\/ul>\n\n\n\n<h3 id=\"L\u1ed7i_429_Too_Many_Requests\"><strong>L\u1ed7i 429 Too Many Requests<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1ed9t s\u1ed1 nguy\u00ean nh\u00e2n ph\u1ed5 bi\u1ebfn:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>h\u1ebft credit.<\/li>\n\n\n\n<li>v\u01b0\u1ee3t quota.<\/li>\n\n\n\n<li>v\u01b0\u1ee3t rate limit.<\/li>\n\n\n\n<li>g\u1eedi qu\u00e1 nhi\u1ec1u request trong th\u1eddi gian ng\u1eafn.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">H\u00e3y ki\u1ec3m tra ph\u1ea7n Billing, Usage ho\u1eb7c Rate Limits c\u1ee7a provider.<\/p>\n\n\n\n<h3 id=\"Model_Request_Failed\"><strong>Model Request Failed<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu TRAE ch\u1ec9 hi\u1ec3n th\u1ecb th\u00f4ng b\u00e1o model request th\u1ea5t b\u1ea1i, h\u00e3y ki\u1ec3m tra l\u1ea7n l\u01b0\u1ee3t:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>API Key.<\/li>\n\n\n\n<li>Model ID.<\/li>\n\n\n\n<li>API Format.<\/li>\n\n\n\n<li>Request URL.<\/li>\n\n\n\n<li>Full URL.<\/li>\n\n\n\n<li>quota API.<\/li>\n\n\n\n<li>context window.<\/li>\n\n\n\n<li>tr\u1ea1ng th\u00e1i d\u1ecbch v\u1ee5 c\u1ee7a provider.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Kh\u00f4ng n\u00ean thay \u0111\u1ed5i nhi\u1ec1u th\u00f4ng s\u1ed1 c\u00f9ng l\u00fac. H\u00e3y s\u1eeda t\u1eebng tr\u01b0\u1eddng v\u00e0 ki\u1ec3m tra l\u1ea1i \u0111\u1ec3 d\u1ec5 x\u00e1c \u0111\u1ecbnh nguy\u00ean nh\u00e2n.<\/p>\n\n\n\n<h2 id=\"M\u1ed9t_s\u1ed1_l\u01b0u_\u00fd_khi_s\u1eed_d\u1ee5ng_API_tr\u00ean_TraeCode\"><strong>M\u1ed9t s\u1ed1 l\u01b0u \u00fd khi s\u1eed d\u1ee5ng API tr\u00ean TraeCode<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lu\u00f4n l\u1ea5y <strong>Model ID<\/strong> t\u1eeb t\u00e0i li\u1ec7u ch\u00ednh th\u1ee9c c\u1ee7a provider.<\/li>\n\n\n\n<li>Kh\u00f4ng chia s\u1ebb API Key trong \u1ea3nh ch\u1ee5p m\u00e0n h\u00ecnh ho\u1eb7c repository c\u00f4ng khai.<\/li>\n\n\n\n<li>Ki\u1ec3m tra <strong>Full URL<\/strong> tr\u01b0\u1edbc khi ch\u1ec9nh endpoint.<\/li>\n\n\n\n<li>Kh\u00f4ng m\u1eb7c \u0111\u1ecbnh m\u1ecdi API OpenAI-compatible \u0111\u1ec1u h\u1ed7 tr\u1ee3 to\u00e0n b\u1ed9 t\u00ednh n\u0103ng gi\u1ed1ng OpenAI.<\/li>\n\n\n\n<li>Theo d\u00f5i token v\u00e0 chi ph\u00ed tr\u1ef1c ti\u1ebfp t\u1ea1i provider.<\/li>\n\n\n\n<li>N\u1ebfu d\u00f9ng proxy ho\u1eb7c gateway, h\u00e3y ki\u1ec3m tra giao th\u1ee9c m\u00e0 gateway h\u1ed7 tr\u1ee3.<\/li>\n\n\n\n<li>N\u00ean th\u1eed model b\u1eb1ng m\u1ed9t prompt \u0111\u01a1n gi\u1ea3n tr\u01b0\u1edbc khi ch\u1ea1y Agent v\u1edbi t\u00e1c v\u1ee5 l\u1edbn.<\/li>\n\n\n\n<li>V\u1edbi t\u00e0i kho\u1ea3n doanh nghi\u1ec7p, quy\u1ec1n th\u00eam Custom Model c\u00f3 th\u1ec3 do qu\u1ea3n tr\u1ecb vi\u00ean ki\u1ec3m so\u00e1t. TRAE Enterprise c\u00f3 t\u00f9y ch\u1ecdn cho ph\u00e9p ho\u1eb7c ch\u1eb7n th\u00e0nh vi\u00ean t\u1ef1 th\u00eam model.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-4.png\" alt=\"C\u00f3 n\u00ean k\u1ebft n\u1ed1i API ri\u00eang v\u1edbi TraeCode?\" class=\"wp-image-130385\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-4.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/them-api-key-vao-traecode-4-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00f3 n\u00ean k\u1ebft n\u1ed1i API ri\u00eang v\u1edbi TraeCode?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 id=\"C\u00f3_n\u00ean_k\u1ebft_n\u1ed1i_API_ri\u00eang_v\u1edbi_TraeCode?\"><strong>C\u00f3 n\u00ean k\u1ebft n\u1ed1i API ri\u00eang v\u1edbi TraeCode?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">K\u1ebft n\u1ed1i API ri\u00eang ph\u00f9 h\u1ee3p khi b\u1ea1n:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>mu\u1ed1n s\u1eed d\u1ee5ng model kh\u00f4ng c\u00f3 trong danh s\u00e1ch m\u1eb7c \u0111\u1ecbnh;<\/li>\n\n\n\n<li>\u0111\u00e3 c\u00f3 API Key c\u1ee7a OpenAI, Anthropic ho\u1eb7c provider kh\u00e1c;<\/li>\n\n\n\n<li>mu\u1ed1n d\u00f9ng OpenRouter \u0111\u1ec3 truy c\u1eadp nhi\u1ec1u model;<\/li>\n\n\n\n<li>s\u1eed d\u1ee5ng model qua API gateway c\u1ee7a doanh nghi\u1ec7p;<\/li>\n\n\n\n<li>c\u00f3 model self-hosted h\u1ed7 tr\u1ee3 OpenAI-compatible API;<\/li>\n\n\n\n<li>mu\u1ed1n ch\u1ee7 \u0111\u1ed9ng l\u1ef1a ch\u1ecdn model cho t\u1eebng d\u1ef1 \u00e1n;<\/li>\n\n\n\n<li>mu\u1ed1n qu\u1ea3n l\u00fd chi ph\u00ed API tr\u1ef1c ti\u1ebfp qua provider.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Ng\u01b0\u1ee3c l\u1ea1i, n\u1ebfu model t\u00edch h\u1ee3p s\u1eb5n trong TRAE \u0111\u00e3 \u0111\u00e1p \u1ee9ng nhu c\u1ea7u, ng\u01b0\u1eddi m\u1edbi c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng model m\u1eb7c \u0111\u1ecbnh \u0111\u1ec3 gi\u1ea3m b\u1edbt kh\u00e2u c\u1ea5u h\u00ecnh.<\/p>\n\n\n\n<h2 id=\"K\u1ebft_lu\u1eadn\"><strong>K\u1ebft lu\u1eadn<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">V\u1edbi kh\u1ea3 n\u0103ng th\u00eam Custom Model, TraeCode tr\u1edf n\u00ean linh ho\u1ea1t h\u01a1n \u0111\u00e1ng k\u1ec3 khi b\u1ea1n mu\u1ed1n k\u1ebft h\u1ee3p m\u00f4i tr\u01b0\u1eddng AI coding v\u1edbi GPT, Claude, DeepSeek, Kimi, GLM, OpenRouter ho\u1eb7c h\u1ea1 t\u1ea7ng model ri\u00eang c\u1ee7a doanh nghi\u1ec7p. H\u00e3y th\u1eed th\u00eam m\u1ed9t model ngay h\u00f4m nay v\u00e0 \u0111\u1ed5i qua l\u1ea1i gi\u1eefa c\u00e1c model \u0111\u1ec3 t\u00ecm l\u1ef1a ch\u1ecdn ph\u00f9 h\u1ee3p nh\u1ea5t v\u1edbi c\u00f4ng vi\u1ec7c c\u1ee7a b\u1ea1n.&nbsp;<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\"><strong>Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/strong><\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"K\u1ebft_n\u1ed1i_Trae_API_c\u00f3_m\u1ea5t_ph\u00ed_kh\u00f4ng?\">K\u1ebft n\u1ed1i Trae API c\u00f3 m\u1ea5t ph\u00ed kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Vi\u1ec7c th\u00eam model v\u00e0o Trae kh\u00f4ng t\u1ed1n ph\u00ed. Chi ph\u00ed ph\u00e1t sinh t\u1eeb nh\u00e0 cung c\u1ea5p, t\u00ednh theo l\u01b0\u1ee3ng token b\u1ea1n d\u00f9ng ho\u1eb7c theo g\u00f3i \u0111\u0103ng k\u00fd.&nbsp;<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Trae_h\u1ed7_tr\u1ee3_nh\u1eefng_nh\u00e0_cung_c\u1ea5p_n\u00e0o?\">Trae h\u1ed7 tr\u1ee3 nh\u1eefng nh\u00e0 cung c\u1ea5p n\u00e0o?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Trae c\u00f3 danh s\u00e1ch nh\u00e0 cung c\u1ea5p c\u00e0i s\u1eb5n v\u00e0 thay \u0111\u1ed5i theo t\u1eebng phi\u00ean b\u1ea3n. Nh\u00e0 cung c\u1ea5p n\u00e0o ngo\u00e0i danh s\u00e1ch v\u1eabn th\u00eam \u0111\u01b0\u1ee3c qua Custom Model n\u1ebfu d\u1ecbch v\u1ee5 t\u01b0\u01a1ng th\u00edch chu\u1ea9n OpenAI ho\u1eb7c Anthropic.&nbsp;<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"C\u00f3_th\u1ec3_k\u1ebft_n\u1ed1i_OpenRouter_v\u1edbi_Trae_kh\u00f4ng?\">C\u00f3 th\u1ec3 k\u1ebft n\u1ed1i OpenRouter v\u1edbi Trae kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">C\u00f3 th\u1ec3, mi\u1ec5n l\u00e0 c\u1ea5u h\u00ecnh s\u1eed d\u1ee5ng endpoint, API Key, Model ID v\u00e0 giao th\u1ee9c t\u01b0\u01a1ng th\u00edch m\u00e0 OpenRouter cung c\u1ea5p. T\u00e0i li\u1ec7u TRAE c\u0169ng li\u1ec7t k\u00ea OpenRouter trong nh\u00f3m d\u1ecbch v\u1ee5 th\u01b0\u1eddng s\u1eed d\u1ee5ng OpenAI Chat Completions.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"T\u1ea1i_sao_\u0111\u00e3_d\u00e1n_\u0111\u00fang_key_m\u00e0_v\u1eabn_b\u00e1o_l\u1ed7i?\">T\u1ea1i sao \u0111\u00e3 d\u00e1n \u0111\u00fang key m\u00e0 v\u1eabn b\u00e1o l\u1ed7i?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Nguy\u00ean nh\u00e2n th\u01b0\u1eddng l\u00e0 key thu\u1ed9c nh\u00e0 cung c\u1ea5p kh\u00e1c, t\u00e0i kho\u1ea3n h\u1ebft quota, ho\u1eb7c c\u1ea5u h\u00ecnh Custom Model sai URL v\u00e0 Model ID. H\u00e3y \u0111\u1ecdc nh\u1eadt k\u00fd l\u1ed7i trong c\u1eeda s\u1ed5 Add Model \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh \u0111\u00fang nguy\u00ean nh\u00e2n.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"K\u1ebft n\u1ed1i Trae API c\u00f3 m\u1ea5t ph\u00ed kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Vi\u1ec7c th\u00eam model v\u00e0o Trae kh\u00f4ng t\u1ed1n ph\u00ed. Chi ph\u00ed ph\u00e1t sinh t\u1eeb nh\u00e0 cung c\u1ea5p, t\u00ednh theo l\u01b0\u1ee3ng token b\u1ea1n d\u00f9ng ho\u1eb7c theo g\u00f3i \u0111\u0103ng k\u00fd.&nbsp;<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Trae h\u1ed7 tr\u1ee3 nh\u1eefng nh\u00e0 cung c\u1ea5p n\u00e0o?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Trae c\u00f3 danh s\u00e1ch nh\u00e0 cung c\u1ea5p c\u00e0i s\u1eb5n v\u00e0 thay \u0111\u1ed5i theo t\u1eebng phi\u00ean b\u1ea3n. Nh\u00e0 cung c\u1ea5p n\u00e0o ngo\u00e0i danh s\u00e1ch v\u1eabn th\u00eam \u0111\u01b0\u1ee3c qua Custom Model n\u1ebfu d\u1ecbch v\u1ee5 t\u01b0\u01a1ng th\u00edch chu\u1ea9n OpenAI ho\u1eb7c Anthropic.&nbsp;<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"C\u00f3 th\u1ec3 k\u1ebft n\u1ed1i OpenRouter v\u1edbi Trae kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3 th\u1ec3, mi\u1ec5n l\u00e0 c\u1ea5u h\u00ecnh s\u1eed d\u1ee5ng endpoint, API Key, Model ID v\u00e0 giao th\u1ee9c t\u01b0\u01a1ng th\u00edch m\u00e0 OpenRouter cung c\u1ea5p. T\u00e0i li\u1ec7u TRAE c\u0169ng li\u1ec7t k\u00ea OpenRouter trong nh\u00f3m d\u1ecbch v\u1ee5 th\u01b0\u1eddng s\u1eed d\u1ee5ng OpenAI Chat Completions.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"T\u1ea1i sao \u0111\u00e3 d\u00e1n \u0111\u00fang key m\u00e0 v\u1eabn b\u00e1o l\u1ed7i?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Nguy\u00ean nh\u00e2n th\u01b0\u1eddng l\u00e0 key thu\u1ed9c nh\u00e0 cung c\u1ea5p kh\u00e1c, t\u00e0i kho\u1ea3n h\u1ebft quota, ho\u1eb7c c\u1ea5u h\u00ecnh Custom Model sai URL v\u00e0 Model ID. H\u00e3y \u0111\u1ecdc nh\u1eadt k\u00fd l\u1ed7i trong c\u1eeda s\u1ed5 Add Model \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh \u0111\u00fang nguy\u00ean nh\u00e2n.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u0110\u1ec3 c\u00e1ch th\u00eam API Key v\u00e0o TraeCode, b\u1ea1n ch\u1ec9 c\u1ea7n v\u00e0o Settings \u2192 Models \u2192 Add Model, ch\u1ecdn nh\u00e0 cung c\u1ea5p c\u00f3 s\u1eb5n ho\u1eb7c Custom Model, sau \u0111\u00f3 nh\u1eadp API Key, Model ID, \u0111\u1ecbnh d\u1ea1ng API v\u00e0 \u0111\u1ecba ch\u1ec9 Request URL. Sau khi l\u01b0u c\u1ea5u h\u00ecnh, model m\u1edbi s\u1ebd xu\u1ea5t hi\u1ec7n trong danh s\u00e1ch \u0111\u1ec3 [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":130386,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7514],"tags":[7711],"class_list":["post-130371","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vibe-code","tag-traecode"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/130371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=130371"}],"version-history":[{"count":3,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/130371\/revisions"}],"predecessor-version":[{"id":130388,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/130371\/revisions\/130388"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/130386"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=130371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=130371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=130371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}