Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.
Generate short-lived residential proxies for your account. Each generated proxy is valid for 24 hours according to the source reference.
Sending this request consumes your short-lived IP allowance. Check the country, optional state, and quantity before sending. The debugger does not automatically retry generation requests.
Generate a batch
Obtain an access token from Log in and enter it as the Bearer credential.
Fill in the required CountryCode and Count. Use an uppercase ISO country code and, if needed, the optional StateCode from the supported locations.
Send once and check the HTTP and business results. Read proxyList and failedList, then compare requestCount with failedCount rather than assuming every requested proxy was generated.
The current public form accepts Count from 1 to 100. This documents the interface’s input range; it does not guarantee that your account has enough allowance or that every location is available. The source does not provide a complete country and state enumeration.If a request times out or is canceled, review your account before sending another batch. A missing response does not prove that generation did not occur. See API response handling.
Use token from the login response in the Authorization: Bearer header. The source does not specify token lifetime or refresh behavior.
Body
application/json
CountryCode
string
required
Uppercase ISO country code. Use /api/Location/SearchUserShort to list available countries.
Example:
"US"
Count
integer
required
Number of short-term proxies to generate, between 1 and 100.
Example:
1
StateCode
string
Optional state or province code within the selected country.
Example:
"CA"
Response
Generated short-term proxies
code
integer
message
string
body
object
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MiyaIP","description":"MiyaIP 帮助中心:代理产品快速入门、HTTP 与 SOCKS5 基础、手机与 AdsPower 配置、开发者接入和常见问题。","colors":{"primary":"#ef7025","light":"#eec9bc","dark":"#4fa1ab"},"logo":{"light":"https://mintcdn.com/miya-556b3641/hZNT7XTlPPopPugm/logo/miya-light.svg?fit=max\u0026auto=format\u0026n=hZNT7XTlPPopPugm\u0026q=85\u0026s=0bd70c28b32f486b9cfe0c67e2b76539","dark":"https://mintcdn.com/miya-556b3641/EwvccuoalfiJYfq_/logo/miya-dark.svg?fit=max\u0026auto=format\u0026n=EwvccuoalfiJYfq_\u0026q=85\u0026s=a8f19dc8595d67618b1f97ac39401263"},"favicon":"https://mintcdn.com/miya-556b3641/O3phwvGYo_Abg4HD/favicon-miya.svg?fit=max\u0026auto=format\u0026n=O3phwvGYo_Abg4HD\u0026q=85\u0026s=2baace52f30cfc443f098a9c5bc2bbb4","navbar":{"links":[]},"seo":{"metatags":{"canonical":"https://help.miyaip.com","robots":"index, follow, max-image-preview:large"},"indexing":"navigable"},"styling":{"latex":false},"navigation":{"languages":[{"language":"zh","default":true,"href":"zh/introduction"},{"language":"en","href":"introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"miya-556b3641","hasAudioNarration":false,"actualSubdomain":"miya-556b3641","customDomains":["help.miyaip.com"],"gitSource":{"type":"github","owner":"1nv0ker","repo":"miyadoc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b1101b79ffae5051c41e20b"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ace35f7a5d30eec4d881a9f","clientVersion":"0.0.4436","searchFilterCounts":[{"language":"en","tag":"Guides","count":34},{"language":"zh","tag":"指南","count":34},{"language":"en","tag":"API integration","count":9},{"language":"en","tag":"Proxy products","count":9},{"language":"zh","tag":"API 接入","count":9},{"language":"zh","tag":"代理产品","count":9},{"language":"en","tag":"Proxy fundamentals","count":8},{"language":"zh","tag":"基础与选型","count":8},{"language":"en","tag":"Developer integrations","count":4},{"language":"en","tag":"Android","count":4},{"language":"zh","tag":"开发者接入","count":4},{"language":"zh","tag":"Android","count":4},{"language":"en","tag":"Proxy generation","count":3},{"language":"en","tag":"Getting started","count":3},{"language":"en","tag":"FAQ","count":3},{"language":"en","tag":"Native proxy","count":3},{"language":"zh","tag":"代理生成","count":3},{"language":"zh","tag":"入门","count":3},{"language":"zh","tag":"常见问题","count":3},{"language":"zh","tag":"原始代理","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"#navbar img.nav-logo{height:3.5rem!important;width:auto!important}#navbar .logout-link,#mobile-nav .logout-link{display:none!important}@media (max-width: 1023px){#navbar img.nav-logo{height:2.75rem!important}}"}]}
{"page":{"pagePath":"api-reference/short-generate","slug":"/api-reference/short-generate","pageMetadata":{"title":"MiyaIP short-lived residential API: generate proxy IPs","sidebarTitle":"Short-lived proxies","description":"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.","openapi":"api-reference/openapi.en.json POST /api/UserShort/GenerateIps","playground":"none","href":"/api-reference/short-generate"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const MiyaApiPlayground=({specUrl,method,path,locale=`en`})=>{const miyaApiOrigin=`https://miyaip.com`;const miyaResponseLimit=200*1024;const miyaAllowedOperations=[`POST /api/SysLogin/Login`,`GET /api/ProxyLogic/Generate`,`POST /api/UserShort/GenerateIps`,`GET /api/ProxyLogic/UnlimitedGenerate`,`GET /api/SysLogin/GetUserInfo`,`GET /api/ProxyLogic/BandwidthAnalysis`,`GET /api/UserIsps/PageList`,`GET /api/DatacenterIps/PageList`];const miyaAllowedSpecs=[`/api-reference/openapi.zh.json`,`/api-reference/openapi.en.json`];const miyaSensitiveKey=/password|passwd|pwd|token|secret|authorization|^crc$|keyname|key$|api.?key|user.?name|proxy.?user|proxy.?pass|full.?proxy/i;const miyaLabels=locale=>locale===`zh`?{title:`在线调试`,loading:`正在加载接口配置…`,loadError:`无法加载接口配置。请刷新页面后重试。`,unsupported:`此调试器仅支持文档中列出的 MiyaIP 接口。`,request:`请求预览(凭据已隐藏)`,send:`发送请求`,sending:`请求中…`,cancel:`取消请求`,clear:`清空`,optional:`可选`,required:`必填`,requiredError:`请填写此项。`,integerError:`请输入整数。`,emailError:`请输入有效的邮箱地址。`,enumError:`请选择文档列出的选项。`,minimum:`最小值为`,maximum:`最大值为`,live:`点击发送会向 MiyaIP 发送实际请求。凭据和响应仅保存在本页面的内存中。`,cancelNote:`超时或取消只会停止浏览器等待,不能保证服务器撤销请求;调试器不会自动重试。`,response:`响应`,elapsed:`耗时`,status:`HTTP 状态`,contentType:`响应类型`,businessCode:`业务 code`,httpSuccess:`HTTP 请求完成`,businessSuccess:`业务 code 表示成功`,businessError:`接口返回业务错误`,httpError:`接口返回 HTTP 错误`,networkError:`请求失败。请检查网络、跨域策略及连接状态。`,timeout:`等待超过 30 秒,请求已停止等待。`,cancelled:`已取消等待响应。`,truncated:`响应超过 200 KiB,展示内容已截断;不能据此判断完整 JSON 或业务结果。`,invalidJson:`响应无法解析为 JSON,请检查响应类型和原始返回内容。`,jsonHidden:`为避免泄露敏感字段,不展示截断或无法解析的 JSON 正文。`,empty:`响应正文为空。`,showProxy:`显示代理连接信息`,hideProxy:`隐藏代理连接凭据`,token:`登录 Token`,showToken:`显示 Token`,hideToken:`隐藏 Token`,copyToken:`复制 Token`,copied:`已复制 Token。`,copyFailed:`复制失败,请显示 Token 后手动复制。`,masked:`敏感字段默认隐藏。`,proxyMasked:`代理连接凭据默认隐藏,可主动显示完整原文。`}:{title:`Try this API`,loading:`Loading the API configuration…`,loadError:`The API configuration could not be loaded. Refresh this page and try again.`,unsupported:`This form only supports the MiyaIP endpoints listed in these docs.`,request:`Request preview (credentials hidden)`,send:`Send request`,sending:`Sending…`,cancel:`Cancel request`,clear:`Clear`,optional:`Optional`,required:`Required`,requiredError:`Enter a value.`,integerError:`Enter a whole number.`,emailError:`Enter a valid email address.`,enumError:`Select one of the documented options.`,minimum:`The minimum is`,maximum:`The maximum is`,live:`Sending makes a real request to MiyaIP. Credentials and responses remain in memory on this page only.`,cancelNote:`A timeout or cancellation stops the browser from waiting; it does not guarantee that the server cancels the request. This form never retries automatically.`,response:`Response`,elapsed:`Elapsed`,status:`HTTP status`,contentType:`Content type`,businessCode:`Business code`,httpSuccess:`HTTP request completed`,businessSuccess:`The business code indicates success`,businessError:`The API returned a business error`,httpError:`The API returned an HTTP error`,networkError:`The request failed. Check the network, CORS policy, and connection status.`,timeout:`The 30-second wait expired. The browser stopped waiting.`,cancelled:`Stopped waiting for the response.`,truncated:`The response exceeds 200 KiB and has been truncated. A partial response cannot confirm a complete JSON or business result.`,invalidJson:`The response could not be parsed as JSON. Check its content type and returned content.`,jsonHidden:`A truncated or unparseable JSON body is not displayed, so its sensitive fields cannot be exposed.`,empty:`The response body is empty.`,showProxy:`Show proxy credentials`,hideProxy:`Hide proxy credentials`,token:`Login token`,showToken:`Show token`,hideToken:`Hide token`,copyToken:`Copy token`,copied:`Token copied.`,copyFailed:`Copy failed. Show the token and copy it manually.`,masked:`Sensitive fields are hidden by default.`,proxyMasked:`Proxy credentials are hidden by default. You can explicitly show the original text.`};const miyaActiveFields=(fields,values)=>fields.filter(field=>!field.showWhen||Object.entries(field.showWhen).every(([name,expected])=>String(values[name])===String(expected)));const miyaDefaultValues=fields=>Object.fromEntries(fields.map(field=>[field.name,field.defaultValue===undefined||field.defaultValue===null?``:String(field.defaultValue)]));const miyaValidate=(fields,values,labels)=>{const errors={};miyaActiveFields(fields,values).forEach(field=>{const value=String(values[field.name]??``).trim();if(!value){if(field.required)errors[field.name]=labels.requiredError;return}if(field.type===`integer`){const number=Number(value);if(!/^-?\\d+$/.test(value)||!Number.isSafeInteger(number))errors[field.name]=labels.integerError;else if(field.min!==undefined\u0026\u0026number\u003cfield.min)errors[field.name]=`${labels.minimum} ${field.min}.`;else if(field.max!==undefined\u0026\u0026number>field.max)errors[field.name]=`${labels.maximum} ${field.max}.`}if(field.input===`email`\u0026\u0026!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value))errors[field.name]=labels.emailError;if(field.options?.length\u0026\u0026!field.options.some(option=>String(option.value)===value))errors[field.name]=labels.enumError});return errors};const miyaBearerToken=value=>String(value).trim().replace(/^Bearer\\s+/i,``).trim();const miyaKnownSecrets=(fields,values)=>miyaActiveFields(fields,values).filter(field=>field.sensitive||field.in===`header`||miyaSensitiveKey.test(field.name)).flatMap(field=>{const raw=String(values[field.name]??``);return field.in===`header`?[raw,raw.trim(),miyaBearerToken(raw)]:[raw]}).filter(Boolean).sort((a,b)=>b.length-a.length);const miyaMaskString=(text,secrets=[])=>{let masked=String(text);secrets.forEach(secret=>{const formEncoded=new URLSearchParams([[`value`,secret]]).toString().slice(`value=`.length);[...new Set([secret,encodeURIComponent(secret),formEncoded])].sort((a,b)=>b.length-a.length).forEach(variant=>{masked=masked.split(variant).join(`[hidden]`)})});return masked.replace(/((?:https?|socks5?h?):\\/\\/)[^\\s/@]+(?::[^\\s/@]*)?@/gi,`$1[hidden]@`).replace(/(^|\\n)(\\s*)[^\\r\\n\\s@]+@([^\\r\\n]+)/g,`$1$2[hidden]@$3`).replace(/(^|\\n)(\\s*)[^:\\s]+:[^:\\s]+:(\\[[^\\]\\s]+\\]|[^:\\s]+):(\\d+)(?=\\r?\\n|$)/g,`$1$2[hidden]:[hidden]:$3:$4`).replace(/(^|\\n)(\\s*(?:\\[[^\\]\\s]+\\]|[^\\s:]+):\\d+:)[^\\r\\n]+/g,`$1$2[hidden]:[hidden]`)};const miyaRedactJson=(value,secrets=[])=>{if(Array.isArray(value))return value.map(item=>miyaRedactJson(item,secrets));if(value\u0026\u0026typeof value===`object`)return Object.fromEntries(Object.entries(value).map(([key,item])=>[key,miyaSensitiveKey.test(key)\u0026\u0026item!==null\u0026\u0026item!==``\u0026\u0026[`string`,`object`].includes(typeof item)?`[hidden]`:miyaRedactJson(item,secrets)]));return typeof value===`string`?miyaMaskString(value,secrets):value};const miyaMaskProxyText=(text,format,secrets)=>String(text).split(`\n`).map(line=>{if(!line.trim())return line;let masked;if(String(format)===`0`)masked=line.replace(/^(\\s*(?:\\[[^\\]\\s]+\\]|[^:\\s]+):\\d+):[^\\r\\n]+$/,`$1:[hidden]:[hidden]`);else if(String(format)===`1`)masked=line.replace(/^(\\s*)[^\\r\\n]+@([^\\r\\n]+)$/,`$1[hidden]@$2`);else if(String(format)===`2`)masked=line.replace(/^(\\s*)[^\\r\\n]+:(\\[[^\\]\\s]+\\]|[^:\\s]+):(\\d+)\\s*$/,`$1[hidden]:[hidden]:$2:$3`);return masked\u0026\u0026masked!==line?miyaMaskString(masked,secrets):`[hidden]`}).join(`\n`);const miyaFindToken=value=>{if(!value||typeof value!==`object`)return``;for(const[key,item]of Object.entries(value)){if(/^(?:token|access_?token|jwt)$/i.test(key)\u0026\u0026typeof item===`string`\u0026\u0026item)return item;if(item\u0026\u0026typeof item===`object`){const found=miyaFindToken(item);if(found)return found}}return``};const miyaBuildRequest=(method,path,fields,values,redacted=false)=>{if(!miyaAllowedOperations.includes(`${method} ${path}`))throw new Error(`Unsupported operation`);const url=new URL(path,miyaApiOrigin);const headers={Accept:`application/json, text/plain`};const body={};miyaActiveFields(fields,values).forEach(field=>{const raw=String(values[field.name]??``);if(!raw.trim())return;const sensitive=field.sensitive||field.in===`header`||miyaSensitiveKey.test(field.name);const value=redacted\u0026\u0026sensitive?`[hidden]`:field.type===`integer`?Number(raw):raw;if(field.in===`header`){headers.Authorization=redacted?`Bearer [hidden]`:`Bearer ${miyaBearerToken(raw)}`}else if(field.in===`query`)url.searchParams.set(field.name,String(value));else if(field.in===`body`)body[field.name]=value});const init={method,headers,credentials:`omit`,mode:`cors`,redirect:`error`};if(method===`POST`){headers[`Content-Type`]=`application/json`;init.body=JSON.stringify(body)}return{url:url.toString(),init}};const miyaReadResponse=async(response,limit=miyaResponseLimit)=>{if(!response.body?.getReader){const bytes=new TextEncoder().encode(await response.text());return{text:new TextDecoder().decode(bytes.subarray(0,limit)),truncated:bytes.length>limit}}const reader=response.body.getReader();const chunks=[];let size=0;let truncated=false;try{while(true){const{value,done}=await reader.read();if(done)break;const remaining=limit-size;if(value.byteLength>remaining){if(remaining>0)chunks.push(value.subarray(0,remaining));size=limit;truncated=true;await reader.cancel();break}chunks.push(value);size+=value.byteLength}}finally{reader.releaseLock()}const bytes=new Uint8Array(size);let offset=0;chunks.forEach(chunk=>{bytes.set(chunk,offset);offset+=chunk.byteLength});return{text:new TextDecoder().decode(bytes),truncated}};const miyaParseResponse=(response,payload,method,path,secrets,outputFormat)=>{const contentType=response.headers.get(`content-type`)||``;const expectsText=method===`GET`\u0026\u0026[`/api/ProxyLogic/Generate`,`/api/ProxyLogic/UnlimitedGenerate`].includes(path);let parsed=null;let invalidJson=false;if(!payload.truncated\u0026\u0026payload.text.trim()\u0026\u0026(contentType.includes(`json`)||!expectsText)){try{parsed=JSON.parse(payload.text)}catch{invalidJson=true}}const code=parsed\u0026\u0026!Array.isArray(parsed)\u0026\u0026typeof parsed===`object`?parsed.code:undefined;const codeSuccess=code===0||code===200||code===`0`||code===`200`;const kind=!response.ok?`httpError`:payload.truncated?`truncated`:invalidJson?`invalidJson`:code!==undefined?codeSuccess?`businessSuccess`:`businessError`:`httpSuccess`;const token=path===`/api/SysLogin/Login`\u0026\u0026response.ok\u0026\u0026!payload.truncated\u0026\u0026kind!==`businessError`?miyaFindToken(parsed):``;const textResponse=parsed===null\u0026\u0026expectsText\u0026\u0026!contentType.includes(`json`);const hiddenJson=!textResponse\u0026\u0026(payload.truncated||invalidJson);return{status:response.status,contentType,kind,code,truncated:payload.truncated,rawText:payload.text,textResponse,hiddenJson,token,maskedText:hiddenJson?``:parsed!==null?JSON.stringify(miyaRedactJson(parsed,[...secrets,token].filter(Boolean)),null,2):textResponse?miyaMaskProxyText(payload.text,outputFormat,secrets):miyaMaskString(payload.text,[...secrets,token].filter(Boolean))}};const labels=useMemo(()=>miyaLabels(locale),[locale]);const[config,setConfig]=useState(null);const[values,setValues]=useState({});const[errors,setErrors]=useState({});const[loading,setLoading]=useState(true);const[loadError,setLoadError]=useState(``);const[pending,setPending]=useState(false);const[result,setResult]=useState(null);const[showToken,setShowToken]=useState(false);const[showProxy,setShowProxy]=useState(false);const[notice,setNotice]=useState(``);const requestRef=useRef(null);const sequenceRef=useRef(0);const liveRef=useRef(false);useEffect(()=>{liveRef.current=true;sequenceRef.current+=1;requestRef.current?.controller.abort();requestRef.current=null;setConfig(null);setValues({});setErrors({});setResult(null);setShowToken(false);setShowProxy(false);setNotice(``);setPending(false);setLoading(true);setLoadError(``);const specController=new AbortController;let current=true;const load=async()=>{if(!miyaAllowedSpecs.includes(specUrl)||!miyaAllowedOperations.includes(`${method} ${path}`)){if(current){setLoadError(labels.unsupported);setLoading(false)}return}try{const response=await fetch(specUrl,{credentials:`omit`,signal:specController.signal});if(!response.ok)throw new Error(`Configuration unavailable`);const spec=await response.json();const metadata=spec.paths?.[path]?.[method.toLowerCase()]?.[`x-miya-playground`];if(!metadata||!Array.isArray(metadata.fields)||!metadata.fields.every(field=>typeof field.name===`string`\u0026\u0026[`query`,`body`,`header`].includes(field.in)))throw new Error(`Invalid configuration`);if(current){setConfig(metadata);setValues(miyaDefaultValues(metadata.fields))}}catch(error){if(current\u0026\u0026!specController.signal.aborted)setLoadError(labels.loadError)}finally{if(current)setLoading(false)}};load();return()=>{current=false;liveRef.current=false;sequenceRef.current+=1;specController.abort();requestRef.current?.controller.abort();requestRef.current=null}},[specUrl,method,path,locale]);const fields=config?.fields||[];const activeFields=miyaActiveFields(fields,values);const preview=useMemo(()=>{if(!config)return``;try{const request=miyaBuildRequest(method,path,config.fields,values,true);return`${method} ${request.url}\\n${Object.entries(request.init.headers).map(([key,value])=>`${key}: ${value}`).join(`\n`)}${request.init.body?`\\n\\n${JSON.stringify(JSON.parse(request.init.body),null,2)}`:``}`}catch{return``}},[config,values,method,path]);const updateValue=(name,value)=>{setValues(previous=>({...previous,[name]:value}));setErrors(previous=>{const next={...previous};delete next[name];return next})};const cancel=()=>{const active=requestRef.current;if(!active)return;sequenceRef.current+=1;active.controller.abort();requestRef.current=null;setPending(false);setResult({kind:`cancelled`,elapsed:Math.round(performance.now()-active.started)});setShowToken(false);setShowProxy(false);setNotice(``)};const clear=()=>{sequenceRef.current+=1;requestRef.current?.controller.abort();requestRef.current=null;setValues(miyaDefaultValues(fields));setErrors({});setResult(null);setShowToken(false);setShowProxy(false);setNotice(``);setPending(false)};const submit=async event=>{event.preventDefault();if(!config||requestRef.current||!liveRef.current)return;const nextErrors=miyaValidate(fields,values,labels);setErrors(nextErrors);if(Object.keys(nextErrors).length)return;const controller=new AbortController;const serial=++sequenceRef.current;const started=performance.now();requestRef.current={controller,serial,started};setPending(true);setResult(null);setShowToken(false);setShowProxy(false);setNotice(``);let timedOut=false;let status;let contentType;const timeout=setTimeout(()=>{timedOut=true;controller.abort()},3e4);try{const request=miyaBuildRequest(method,path,fields,values);const response=await fetch(request.url,{...request.init,signal:controller.signal});status=response.status;contentType=response.headers.get(`content-type`)||``;const payload=await miyaReadResponse(response);const parsed=miyaParseResponse(response,payload,method,path,miyaKnownSecrets(fields,values),values.Format);if(liveRef.current\u0026\u0026sequenceRef.current===serial)setResult({...parsed,elapsed:Math.round(performance.now()-started)})}catch{if(liveRef.current\u0026\u0026sequenceRef.current===serial)setResult({kind:timedOut?`timeout`:controller.signal.aborted?`cancelled`:`networkError`,status,contentType,elapsed:Math.round(performance.now()-started)})}finally{clearTimeout(timeout);if(requestRef.current?.serial===serial)requestRef.current=null;if(liveRef.current\u0026\u0026sequenceRef.current===serial)setPending(false)}};const copyToken=async()=>{if(!result?.token)return;const serial=sequenceRef.current;try{await navigator.clipboard.writeText(result.token);if(liveRef.current\u0026\u0026sequenceRef.current===serial)setNotice(labels.copied)}catch{if(liveRef.current\u0026\u0026sequenceRef.current===serial)setNotice(labels.copyFailed)}};const border=`1px solid rgba(128, 128, 128, 0.35)`;const inputStyle={width:`100%`,minWidth:0,border,borderRadius:`8px`,padding:`8px 10px`,background:`transparent`,color:`inherit`,font:`inherit`,colorScheme:`inherit`};const buttonStyle={border,borderRadius:`8px`,padding:`8px 12px`,background:`transparent`,color:`inherit`,cursor:`pointer`,font:`inherit`,fontSize:`14px`};const preStyle={border,borderRadius:`8px`,padding:`12px`,maxHeight:`420px`,overflow:`auto`,whiteSpace:`pre-wrap`,overflowWrap:`anywhere`,fontSize:`13px`,lineHeight:1.6,background:`rgba(128, 128, 128, 0.06)`,color:`inherit`};const hasResponseBody=result\u0026\u0026result.rawText!==undefined;const responseText=hasResponseBody?result.hiddenJson?labels.jsonHidden:result.textResponse\u0026\u0026showProxy?result.rawText:result.maskedText:``;return _jsxs(`section`,{\"data-miya-api-playground\":`true`,\"aria-label\":labels.title,style:{border,borderRadius:`12px`,padding:`20px`,margin:`24px 0`,color:`inherit`},children:[_jsx(`h3`,{style:{marginTop:0},children:labels.title}),loading\u0026\u0026_jsx(`p`,{role:`status`,children:labels.loading}),loadError\u0026\u0026_jsx(`p`,{role:`alert`,children:loadError}),config\u0026\u0026!loading\u0026\u0026_jsxs(_Fragment,{children:[_jsx(`p`,{style:{fontSize:`14px`,lineHeight:1.6},children:labels.live}),config.warning\u0026\u0026_jsx(`p`,{style:{borderLeft:`3px solid #ef7025`,paddingLeft:`12px`,fontSize:`14px`},children:config.warning}),_jsxs(`form`,{onSubmit:submit,noValidate:true,children:[_jsx(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(min(100%, 240px), 1fr))`,gap:`16px`,margin:`18px 0`},children:activeFields.map(field=>_jsxs(`label`,{style:{display:`block`,minWidth:0},children:[_jsxs(`span`,{style:{display:`block`,marginBottom:`6px`,fontSize:`14px`,fontWeight:600},children:[field.label||field.name,` `,_jsxs(`span`,{style:{fontWeight:400,opacity:.7},children:[`(`,field.required?labels.required:labels.optional,`)`]})]}),field.input===`select`||field.options?.length?_jsxs(`select`,{name:field.name,value:values[field.name]??``,disabled:pending,style:inputStyle,\"aria-invalid\":Boolean(errors[field.name]),onChange:event=>updateValue(field.name,event.target.value),children:[!field.options?.some(option=>String(option.value)===``)\u0026\u0026_jsx(`option`,{value:``,children:`—`}),(field.options||[]).map(option=>_jsx(`option`,{value:String(option.value),children:option.label||String(option.value)},String(option.value)))]}):_jsx(`input`,{name:field.name,type:field.sensitive||field.in===`header`?`password`:field.input||(field.type===`integer`?`number`:`text`),value:values[field.name]??``,placeholder:field.placeholder||``,min:field.min,max:field.max,step:field.type===`integer`?1:undefined,disabled:pending,autoComplete:`off`,spellCheck:false,\"aria-invalid\":Boolean(errors[field.name]),onChange:event=>updateValue(field.name,event.target.value),style:inputStyle}),field.description\u0026\u0026_jsx(`span`,{style:{display:`block`,fontSize:`12px`,lineHeight:1.5,opacity:.75,marginTop:`5px`},children:field.description}),errors[field.name]\u0026\u0026_jsx(`span`,{role:`alert`,style:{display:`block`,fontSize:`13px`,color:`#ef7025`,marginTop:`4px`},children:errors[field.name]})]},field.name))}),_jsxs(`details`,{style:{margin:`16px 0`},children:[_jsx(`summary`,{style:{cursor:`pointer`,fontSize:`14px`},children:labels.request}),_jsx(`pre`,{\"data-miya-request-preview\":`true`,style:preStyle,children:preview})]}),_jsxs(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`8px`},children:[_jsx(`button`,{type:`submit`,disabled:pending,style:{...buttonStyle,background:`#ef7025`,color:`#fff`,borderColor:`#ef7025`,opacity:pending?.6:1},children:pending?labels.sending:config.submitLabel||labels.send}),pending\u0026\u0026_jsx(`button`,{type:`button`,onClick:cancel,style:buttonStyle,children:labels.cancel}),_jsx(`button`,{type:`button`,onClick:clear,style:buttonStyle,children:labels.clear})]})]}),_jsx(`p`,{style:{fontSize:`12px`,lineHeight:1.6,opacity:.75},children:labels.cancelNote}),result\u0026\u0026_jsxs(`div`,{\"data-miya-response\":`true`,\"aria-live\":`polite`,style:{marginTop:`20px`},children:[_jsx(`h4`,{style:{marginBottom:`8px`},children:labels.response}),_jsx(`p`,{role:[`networkError`,`timeout`,`httpError`,`businessError`,`invalidJson`].includes(result.kind)?`alert`:`status`,children:labels[result.kind]||labels.httpSuccess}),_jsxs(`p`,{style:{fontSize:`13px`,display:`flex`,flexWrap:`wrap`,gap:`12px`},children:[result.status!==undefined\u0026\u0026_jsxs(`span`,{children:[labels.status,`: `,_jsx(`strong`,{children:result.status})]}),_jsxs(`span`,{children:[labels.elapsed,`: `,result.elapsed,` ms`]}),result.code!==undefined\u0026\u0026_jsxs(`span`,{children:[labels.businessCode,`: `,_jsx(`strong`,{children:String(result.code)})]}),result.contentType\u0026\u0026_jsxs(`span`,{children:[labels.contentType,`: `,result.contentType]})]}),result.truncated\u0026\u0026result.kind!==`truncated`\u0026\u0026_jsx(`p`,{children:labels.truncated}),result.token\u0026\u0026_jsxs(`div`,{style:{border,borderRadius:`8px`,padding:`12px`,margin:`12px 0`},children:[_jsxs(`p`,{style:{margin:`0 0 8px`,fontSize:`14px`},children:[labels.token,`: `,_jsx(`code`,{style:{overflowWrap:`anywhere`},children:showToken?result.token:`••••••••`})]}),_jsxs(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`8px`},children:[_jsx(`button`,{type:`button`,onClick:()=>setShowToken(shown=>!shown),style:buttonStyle,children:showToken?labels.hideToken:labels.showToken}),_jsx(`button`,{type:`button`,onClick:copyToken,style:buttonStyle,children:labels.copyToken})]}),notice\u0026\u0026_jsx(`p`,{role:`status`,style:{fontSize:`13px`,marginBottom:0},children:notice})]}),hasResponseBody\u0026\u0026_jsxs(_Fragment,{children:[_jsx(`p`,{style:{fontSize:`12px`,opacity:.75},children:result.textResponse?labels.proxyMasked:labels.masked}),result.textResponse\u0026\u0026_jsx(`button`,{type:`button`,onClick:()=>setShowProxy(shown=>!shown),style:buttonStyle,children:showProxy?labels.hideProxy:labels.showProxy}),_jsx(`pre`,{\"data-miya-response-body\":`true`,style:preStyle,children:responseText||labels.empty})]})]})]})]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,..._provideComponents(),...props.components},{Heading,Warning,_MdxComponentBoundary}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Generate short-lived residential proxies for your account. Each generated proxy is valid for 24 hours according to the source reference.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Sending this request consumes your short-lived IP allowance. Check the country, optional state, and quantity before sending. The debugger does not automatically retry generation requests.`})}),`\n`,_jsx(Heading,{level:`2`,id:`generate-a-batch`,children:`Generate a batch`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Obtain an access token from `,_jsx(_components.a,{href:`/api-reference/login`,children:`Log in`}),` and enter it as the Bearer credential.`]}),`\n`,_jsxs(_components.li,{children:[`Fill in the required `,_jsx(_components.code,{children:`CountryCode`}),` and `,_jsx(_components.code,{children:`Count`}),`. Use an uppercase ISO country code and, if needed, the optional `,_jsx(_components.code,{children:`StateCode`}),` from the supported locations.`]}),`\n`,_jsxs(_components.li,{children:[`Send once and check the HTTP and business results. Read `,_jsx(_components.code,{children:`proxyList`}),` and `,_jsx(_components.code,{children:`failedList`}),`, then compare `,_jsx(_components.code,{children:`requestCount`}),` with `,_jsx(_components.code,{children:`failedCount`}),` rather than assuming every requested proxy was generated.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The current public form accepts `,_jsx(_components.code,{children:`Count`}),` from 1 to 100. This documents the interface’s input range; it does not guarantee that your account has enough allowance or that every location is available. The source does not provide a complete country and state enumeration.`]}),`\n`,_jsxs(_components.p,{children:[`If a request times out or is canceled, review your account before sending another batch. A missing response does not prove that generation did not occur. See `,_jsx(_components.a,{href:`/api-reference/overview`,children:`API response handling`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`online-debugging`,children:`Online debugging`}),`\n`,_jsx(_MdxComponentBoundary,{name:`MiyaApiPlayground`,children:_jsx(MiyaApiPlayground,{specUrl:`/api-reference/openapi.en.json`,method:`POST`,path:`/api/UserShort/GenerateIps`,locale:`en`},`en:short-generate`)}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://miyaip.com/developer-center?endpoint=short-generate`,children:`Source: official short-lived generation reference`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{MiyaApiPlayground,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"MiyaIP short-lived residential API: generate proxy IPs","sidebarTitle":"Short-lived proxies","description":"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.","openapi":"api-reference/openapi.en.json POST /api/UserShort/GenerateIps","playground":"none","href":"/api-reference/short-generate"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[153,21663,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Generate a batch","slug":"generate-a-batch","depth":2,"children":[]},{"title":"Online debugging","slug":"online-debugging","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"short-generate","tags":["proxy-generation"],"summary":"Generate short-term proxies","description":"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.","externalDocs":{"description":"Source reference for this endpoint","url":"https://miyaip.com/developer-center?endpoint=short-generate"},"security":["320c0ec8-e380-4e74-b7dd-c770e5eb4999"],"responses":{"200":"a342e928-8a02-4007-956e-25e689b72700","400":"5bf08b6d-b185-4ecb-9f54-e19cbcfb0256"},"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -X POST 'https://miyaip.com/api/UserShort/GenerateIps' \\\n -H 'Accept: application/json' \\\n -H 'Authorization: Bearer \u003cYOUR_TOKEN>' \\\n -H 'Content-Type: application/json' \\\n --data '{\n \"CountryCode\": \"US\",\n \"StateCode\": \"CA\",\n \"Count\": 1\n}'"},{"lang":"javascript","label":"JavaScript","source":"const url = 'https://miyaip.com/api/UserShort/GenerateIps';\n\nconst response = await fetch(url, {\n method: 'POST',\n headers: {\n \"Accept\": \"application/json\",\n \"Authorization\": \"Bearer \u003cYOUR_TOKEN>\",\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n \"CountryCode\": \"US\",\n \"StateCode\": \"CA\",\n \"Count\": 1\n }),\n});\n\nconst result = await response.text();\nconsole.log(result);"},{"lang":"python","label":"Python","source":"import requests\n\nurl = \"https://miyaip.com/api/UserShort/GenerateIps\"\nheaders = {\n \"Accept\": \"application/json\",\n \"Authorization\": \"Bearer \u003cYOUR_TOKEN>\"\n}\npayload = {\n \"CountryCode\": \"US\",\n \"StateCode\": \"CA\",\n \"Count\": 1\n}\n\nresponse = requests.post(url, headers=headers, json=payload, timeout=30)\nresponse.raise_for_status()\nprint(response.text)"}],"x-miya-playground":{"fields":[{"name":"BearerToken","in":"header","type":"string","input":"password","required":true,"sensitive":true,"defaultValue":"","placeholder":"Paste token without the Bearer prefix","description":"Token returned by the login API. The explorer sends it as Authorization: Bearer \u003ctoken>.","label":"Bearer token","options":[]},{"name":"CountryCode","in":"body","type":"string","input":"text","required":true,"sensitive":false,"defaultValue":"","placeholder":"US","description":"Uppercase ISO country code. Use /api/Location/SearchUserShort to list available countries.","label":"Country code","options":[]},{"name":"StateCode","in":"body","type":"string","input":"text","required":false,"sensitive":false,"defaultValue":"","placeholder":"CA","description":"Optional state or province code within the selected country.","label":"State / province code","options":[]},{"name":"Count","in":"body","type":"integer","input":"number","required":true,"sensitive":false,"defaultValue":"1","placeholder":"","description":"Number of short-term proxies to generate, between 1 and 100.","label":"Quantity","options":[],"min":1,"max":100}],"auth":"bearer","submitLabel":"Send request (uses short-term IP quota)","warning":"Generation consumes short-term IP quota from the current account. Each generated proxy is valid for 24 hours."},"requestBody":"f132cbfa-6436-4d11-bccc-7eb6f5cc0aaf","method":"post","type":"path","servers":["568c5c4a-2fa9-4af0-86e1-b3c13e5a6a10"],"path":"/api/UserShort/GenerateIps","baseUrlOptions":["https://miyaip.com"],"title":"Generate short-term proxies","codeSamples":[{"label":"cURL","lang":"bash","source":"curl -X POST 'https://miyaip.com/api/UserShort/GenerateIps' \\\n -H 'Accept: application/json' \\\n -H 'Authorization: Bearer \u003cYOUR_TOKEN>' \\\n -H 'Content-Type: application/json' \\\n --data '{\n \"CountryCode\": \"US\",\n \"StateCode\": \"CA\",\n \"Count\": 1\n}'"},{"label":"JavaScript","lang":"javascript","source":"const url = 'https://miyaip.com/api/UserShort/GenerateIps';\n\nconst response = await fetch(url, {\n method: 'POST',\n headers: {\n \"Accept\": \"application/json\",\n \"Authorization\": \"Bearer \u003cYOUR_TOKEN>\",\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n \"CountryCode\": \"US\",\n \"StateCode\": \"CA\",\n \"Count\": 1\n }),\n});\n\nconst result = await response.text();\nconsole.log(result);"},{"label":"Python","lang":"python","source":"import requests\n\nurl = \"https://miyaip.com/api/UserShort/GenerateIps\"\nheaders = {\n \"Accept\": \"application/json\",\n \"Authorization\": \"Bearer \u003cYOUR_TOKEN>\"\n}\npayload = {\n \"CountryCode\": \"US\",\n \"StateCode\": \"CA\",\n \"Count\": 1\n}\n\nresponse = requests.post(url, headers=headers, json=payload, timeout=30)\nresponse.raise_for_status()\nprint(response.text)"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"CountryCode":{"type":"string","example":"US","description":"Uppercase ISO country code. Use /api/Location/SearchUserShort to list available countries.","isRequired":true,"uniqueKey":"CountryCode","typeLabel":"string"},"Count":{"type":"integer","example":1,"description":"Number of short-term proxies to generate, between 1 and 100.","isRequired":true,"uniqueKey":"Count","typeLabel":"integer"},"StateCode":{"type":"string","example":"CA","description":"Optional state or province code within the selected country.","uniqueKey":"StateCode","typeLabel":"string"}},"required":["CountryCode","Count"],"uniqueKey":"","typeLabel":"object"},"example":{"CountryCode":"US","StateCode":"CA","Count":1},"examples":{"Example":{"title":"Example","value":{"CountryCode":"US","StateCode":"CA","Count":1}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"a342e928-8a02-4007-956e-25e689b72700":{"description":"Generated short-term proxies","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"body":{"type":"object","properties":{"proxyList":{"type":"array","items":{"type":"string","uniqueKey":"body.proxyList.items.[INDEX]","typeLabel":"string"},"uniqueKey":"body.proxyList","typeLabel":"string[]"},"failedList":{"type":"array","items":{"oneOf":[{}],"uniqueKey":"body.failedList.items.[INDEX]","typeLabel":"any"},"uniqueKey":"body.failedList","typeLabel":"any[]"},"requestCount":{"type":"integer","uniqueKey":"body.requestCount","typeLabel":"integer"},"failedCount":{"type":"integer","uniqueKey":"body.failedCount","typeLabel":"integer"}},"uniqueKey":"body","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":200,"message":"Success","body":{"proxyList":["gateway.miyaip.com:10000:username:********"],"failedList":[],"requestCount":1,"failedCount":0}},"examples":{"Example":{"title":"Example","value":{"code":200,"message":"Success","body":{"proxyList":["gateway.miyaip.com:10000:username:********"],"failedList":[],"requestCount":1,"failedCount":0}}}},"exampleType":"examples"}},"exampleType":"examples"},"5bf08b6d-b185-4ecb-9f54-e19cbcfb0256":{"description":"Business or validation error\n\nThe source labels this example as HTTP 400 while its JSON business code is 500. HTTP status and the JSON business code are distinct values; this example is not a complete catalog of error statuses or codes.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"body":{"description":"The source example is null; the source does not define this field's complete value type.","uniqueKey":"body","typeLabel":"any"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":500,"message":"Invalid request","body":null},"examples":{"Example":{"title":"Example","value":{"code":500,"message":"Invalid request","body":null}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"320c0ec8-e380-4e74-b7dd-c770e5eb4999":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Use token from the login response in the Authorization: Bearer \u003ctoken> header. The source does not specify token lifetime or refresh behavior.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"568c5c4a-2fa9-4af0-86e1-b3c13e5a6a10":{"url":"https://miyaip.com","description":"Production API base URL"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Use token from the login response in the Authorization: Bearer \u003ctoken> header. The source does not specify token lifetime or refresh behavior.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Use token from the login response in the Authorization: Bearer \u003ctoken> header. The source does not specify token lifetime or refresh behavior.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.en.json"},"subdomain":"miya-556b3641","siteName":"MiyaIP","title":"MiyaIP short-lived residential API: generate proxy IPs - MiyaIP","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"zh":{"href":"/zh/api-reference/short-generate","matchLevel":1},"en":{"href":"/api-reference/short-generate","matchLevel":0}}},"lastModified":"2026-10-13T13:45:47.386Z","originalFileLocation":"api-reference/short-generate.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MiyaIP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow, max-image-preview:large\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"MiyaIP short-lived residential API: generate proxy IPs - MiyaIP\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MiyaIP\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://help.miyaip.com/api-reference/short-generate\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://miya-556b3641.mintlify.site/_mintlify/api/og/v2?division=Proxy+generation\u0026amp;title=MiyaIP+short-lived+residential+API%3A+generate+proxy+IPs\u0026amp;description=Generate+MiyaIP+short-lived+residential+proxy+IPs+with+a+Bearer+token%2C+country+and+optional+state+selection%2C+and+a+requested+count+that+consumes+IP+allowance.\u0026amp;theme=e02acee2a4dbbfb351c8ef9e\u0026amp;signature=fae2d746d3d630ff98e23e6d72f2817fa1809d19e9565eff404de2f24a6b2be7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"MiyaIP short-lived residential API: generate proxy IPs - MiyaIP\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://miya-556b3641.mintlify.site/_mintlify/api/og/v2?division=Proxy+generation\u0026amp;title=MiyaIP+short-lived+residential+API%3A+generate+proxy+IPs\u0026amp;description=Generate+MiyaIP+short-lived+residential+proxy+IPs+with+a+Bearer+token%2C+country+and+optional+state+selection%2C+and+a+requested+count+that+consumes+IP+allowance.\u0026amp;theme=e02acee2a4dbbfb351c8ef9e\u0026amp;signature=fae2d746d3d630ff98e23e6d72f2817fa1809d19e9565eff404de2f24a6b2be7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/miya-556b3641/vLwvMu_PWqTTh_lh/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MiyaIP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ef7025\">\u003clink data-mint-head rel=\"canonical\" href=\"https://help.miyaip.com/api-reference/short-generate\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/short-generate.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://help.miyaip.com/api-reference/short-generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://help.miyaip.com/zh/api-reference/short-generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://help.miyaip.com/zh/api-reference/short-generate\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://help.miyaip.com/#organization\",\"name\":\"MiyaIP\",\"url\":\"https://help.miyaip.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/miya-556b3641/hZNT7XTlPPopPugm/logo/miya-light.svg?fit=max\u0026auto=format\u0026n=hZNT7XTlPPopPugm\u0026q=85\u0026s=0bd70c28b32f486b9cfe0c67e2b76539\"}},{\"@type\":\"WebSite\",\"@id\":\"https://help.miyaip.com#website\",\"name\":\"MiyaIP\",\"url\":\"https://help.miyaip.com\",\"publisher\":{\"@id\":\"https://help.miyaip.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://help.miyaip.com/api-reference/short-generate#webpage\",\"url\":\"https://help.miyaip.com/api-reference/short-generate\",\"name\":\"MiyaIP short-lived residential API: generate proxy IPs\",\"description\":\"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.\",\"dateModified\":\"2026-10-13T13:45:47.386Z\",\"isPartOf\":{\"@id\":\"https://help.miyaip.com#website\"},\"breadcrumb\":{\"@id\":\"https://help.miyaip.com/api-reference/short-generate#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://help.miyaip.com/api-reference/short-generate#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Proxy generation\",\"item\":\"https://help.miyaip.com/api-reference/dynamic-generate\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MiyaIP short-lived residential API: generate proxy IPs\",\"item\":\"https://help.miyaip.com/api-reference/short-generate\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://help.miyaip.com/api-reference/short-generate#apireference\",\"headline\":\"MiyaIP short-lived residential API: generate proxy IPs\",\"name\":\"MiyaIP short-lived residential API: generate proxy IPs\",\"description\":\"Generate MiyaIP short-lived residential proxy IPs with a Bearer token, country and optional state selection, and a requested count that consumes IP allowance.\",\"url\":\"https://help.miyaip.com/api-reference/short-generate\",\"mainEntityOfPage\":{\"@id\":\"https://help.miyaip.com/api-reference/short-generate#webpage\"},\"dateModified\":\"2026-10-13T13:45:47.386Z\",\"publisher\":{\"@id\":\"https://help.miyaip.com/#organization\"},\"isPartOf\":{\"@id\":\"https://help.miyaip.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MiyaIP\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"MiyaIP\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/short-generate.md","siteName":"MiyaIP","nav":{"global":null,"languages":[{"language":"zh","default":true,"pages":[{"title":"zh","href":"/zh/api-reference/short-generate"}]},{"language":"en","tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API integration","groups":[{"group":"Start here","pages":[{"title":"MiyaIP API integration: authentication and endpoint reference","sidebarTitle":"Overview","href":"/api-reference/overview"}]},{"group":"Authentication","pages":[{"title":"MiyaIP login API: obtain an access token","sidebarTitle":"Log in","openapi":"api-reference/openapi.en.json POST /api/SysLogin/Login","playground":"none","href":"/api-reference/login"}]},{"group":"Proxy generation","pages":[{"title":"MiyaIP dynamic proxy API: generate residential or mobile proxies","sidebarTitle":"Dynamic proxies","description":"Generate MiyaIP dynamic residential or mobile proxy details using Crc and KeyName, with location, session, protocol, and output format settings.","openapi":"api-reference/openapi.en.json GET /api/ProxyLogic/Generate","playground":"none","href":"/api-reference/dynamic-generate"},{"title":"MiyaIP short-lived residential API: generate proxy IPs","sidebarTitle":"Short-lived proxies","openapi":"api-reference/openapi.en.json POST /api/UserShort/GenerateIps","playground":"none","href":"/api-reference/short-generate"},{"title":"MiyaIP unlimited residential API: generate proxy details","sidebarTitle":"Unlimited proxies","description":"Generate MiyaIP unlimited residential proxy details with Crc and KeyName, and choose the location, gateway, session, and text output format.","openapi":"api-reference/openapi.en.json GET /api/ProxyLogic/UnlimitedGenerate","playground":"none","href":"/api-reference/unlimited-generate"}]},{"group":"Account and usage","pages":[{"title":"MiyaIP user information API: account and product credentials","sidebarTitle":"User information","openapi":"api-reference/openapi.en.json GET /api/SysLogin/GetUserInfo","playground":"none","href":"/api-reference/user-info"},{"title":"MiyaIP bandwidth API: residential and mobile traffic usage","sidebarTitle":"Bandwidth usage","openapi":"api-reference/openapi.en.json GET /api/ProxyLogic/BandwidthAnalysis","playground":"none","href":"/api-reference/bandwidth-analysis"}]},{"group":"Proxy inventory","pages":[{"title":"MiyaIP residential assets API: filter and paginate proxy IPs","sidebarTitle":"Residential assets","openapi":"api-reference/openapi.en.json GET /api/UserIsps/PageList","playground":"none","href":"/api-reference/isp-list"},{"title":"MiyaIP datacenter assets API: query purchased proxy IPs","sidebarTitle":"Datacenter assets","openapi":"api-reference/openapi.en.json GET /api/DatacenterIps/PageList","playground":"none","href":"/api-reference/datacenter-list"}]}]}]}]},"basePath":"","title":"MiyaIP short-lived residential API: generate proxy IPs - MiyaIP","deploymentId":"dpl_AYyV3CY85Zsy44WzfDVuMiAS7PWU","buildId":"dpl_AYyV3CY85Zsy44WzfDVuMiAS7PWU","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DPBgY0Zl.js","snippetPresets-DfrK5Qk-.js","utils-BhOu8MoY.js","style-to-object-BY3JEAdk.js","utils-uJw0j5Le.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-Bf5DiN6S.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DIo_VyID.js","_Uint8Array-BCCZOmlk.js","isObject-FP1Yky1u.js","ApiExamples-btA_N7J3.js","usePlaygroundInputsStore-D9E8vgOP.js","shallow-BXJ3D3rC.js","isEqual-DTxWZblT.js","CodeSnippets-yZyeAOhB.js","CodeSnippet-DNSgsmyp.js","use-playground-group-access-B6tdpwEQ.js","Page-C_4zetsC.js","api-description-markdown-Bnx5o_aC.js","DynamicMarkdown-DGZbG3dj.js","SectionHeading-Su-XbcWJ.js","MethodPill-BEHdnIWE.js","getPastedJson-MUjpQ42l.js","Check2Icon-HQrwfTCD.js","axios-CsQoIw0U.js","Markdown-D9ZX5drj.js","AssistantPageLink-BDewKJsB.js","dist-1NU8F86Q.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}