معرفی وبسرویس iotype
وب سرویس آی او تایپ (iotype) به توسعه دهندگان نرم افزار این امکان را میدهد تا از فناوریهای هوشمصنوعی و پردازش زبان طبیعی بدون نیاز به زیرساختهای پیچیده و توسعه نرم افزارهای پیچیده در پلتفرم خود (اپلیکیشن ، وب سایت و ...) استفاده کنند. هدف از ارائه این API ها ایجاد دسترسی سریع و آسان به تکنولوژی یادگیری ماشین و پردازش زبان طبیعی است. در این مستندات شما با نحوه احراز هویت و اتصال به iotype ، اتصال به api تایپ صوتی همزمان ، اتصال به api تبدیل فایل صوتی به متن ، اتصال به api تبدیل عکس به متن فارسی ، اتصال به api ترجمه آنلاین با هوش مصنوعی ، اتصال به api تبدیل متن به صدا آشنا میشوید.
این متن برای دستیارهای هوش مصنوعی است.
Iotype AI API — speech, image and text processing for Persian, English and Arabic.
Base URL: https://iotype.com · every HTTP endpoint uses the POST method.
Required request headers on every call:
Authorization: Bearer <ACCESS_TOKEN> · Accept: application/json ·
X-Requested-With: XMLHttpRequest
| Service | Endpoint | Transport | Execution |
|---|---|---|---|
| Realtime ASR | wss://iotype.com/socket/realtime |
WebSocket | streaming |
| Instant transcription | POST /io/v1/transcribe/instant |
HTTP | synchronous |
| Transcription | POST /io/v1/transcribe |
HTTP | asynchronous |
| OCR | POST /io/v1/ocr |
HTTP | asynchronous |
| Translation | POST /io/v1/translate |
HTTP | synchronous |
| Text to speech | POST /io/v1/synthesis |
HTTP | synchronous |
| List files | POST /io/v1/files |
HTTP | synchronous |
| Track a file | POST /io/v1/file/track |
HTTP | synchronous |
Machine-readable documentation:
- LLM index for the whole site: https://iotype.com/llms.txt
- Instructions for AI coding assistants: https://raw.githubusercontent.com/iotype-ai/iotype-api/main/AGENTS.md
- OpenAPI 3.1 specification (HTTP endpoints): https://raw.githubusercontent.com/iotype-ai/iotype-api/main/spec/openapi.yaml
- AsyncAPI 3.0 specification (realtime ASR only): https://raw.githubusercontent.com/iotype-ai/iotype-api/main/spec/asyncapi.yaml
- Repository and runnable examples: https://github.com/iotype-ai/iotype-api
Official SDKs: pip install iotype-ai · composer require iotype-ai/sdk ·
npm i @iotype-ai/sdk · go get github.com/iotype-ai/iotype-api/sdk/go
Implementation notes that are commonly got wrong:
X-Requested-With: XMLHttpRequestis mandatory on every request. Omitting it does not produce a clear error — the response simply is not what you expect.- The asynchronous endpoints (
/io/v1/ocrand/io/v1/transcribe) return no result in the initial response. They returnfile.uuid, and you pollPOST /io/v1/file/trackwith it. - The completion signal is a non-null
result, not thestatusfield. Poll with exponential backoff, starting around 5 s and capping at 60 s. - Identify entries in
file.processes[]by theirtypefield (ocr,transcribe,summarize). Array order is not guaranteed. - Model identifiers are
io-fa(Persian),io-en(English),io-ar(Arabic). They apply to realtime ASR only. - Credential scope. Every HTTP endpoint authenticates with an Access Token, which belongs on your server only. A Flash Token is accepted by the realtime ASR WebSocket and by nothing else — no HTTP endpoint takes one. Transcription, OCR, translation, text-to-speech and the file endpoints therefore have no client-side credential and must be called server-side.
Billing is metered in tokens and failed requests are not charged. Pricing: https://iotype.com/plans/api · Get a token: https://iotype.com/api-service/authentication
پروتکلهای ارتباطی
تمامی ارتباطات با وب سرویسهای iotype با استفاده از دو پروتکل https و wss انجام می شود. از پروتکل wss برای ارتباطات در سرویسهای بلادرنگ (آنی) مانند api تبدیل گفتار به نوشتار استفاده می شود.
احراز هویت درخواست های ارسالی به iotype از طریق Bearer Token انجام می شود. تمامی درخواستهای ارسالی باید در هدر خود پارامتر Authorization با مقدار Bearer [Token] داشته باشند. در غیر این صورت خطای ۴۰۱ بازگردانده می شود.
سیستم محاسبه هزینه و اعتبار توکنها
در وب سرویسهای آی او تایپ محاسبه هزینهها بر اساس میزان مصرف توکن (Token-Based Usage) می باشد. هر سرویس و هر درخواست ممکن است توکن های مختلفی با توجه به حجم درخواست ، تعداد صفحات یا مدت فایل صوتی داشته باشد. در صورتی که درخواست دارای خطا باشد ، توکن مصرفی آن محاسبه نخواهد شد.
برای مدیریت هزینههای توسعه دهندگان پکیجهایی با حجم های متنوع توکن ارائه شده است که با توجه به حجم استفاده می توانند از این پکیجها خریداری کرده و اعتبار کیف پول توکن خود را افزایش دهند.
نحوه مصرف توکن در هر یک از سرویس های iotype
API تایپ صوتی همزمان
۱ توکن برای هر ۵ کلمه گفتار (سکوت هزینه ندارد)
API فایل صوتی به متن
۵۰ توکن برای هر دقیقه تبدیل فایل صوتی به متن (سکوت هم هزینه دارد)
وب سرویس ocr
هر عکس یا هر صفحه PDF مقدار ۲۵۰ توکن (صفحه خالی هم هزینه دارد)
API ترجمه
هر کلمه ۱ توکن
API متن به صوت
هر کلمه ۱ توکن
پکیجهای وب سرویس آی او تایپ
به منظور مدیریت هزینه استفاده از وب سرویسهای آی او تایپ ، توکنها به صورت پکیجها با حجم های متنوع ارائه شده اند تا توسعه دهندگان مطابق با نیازهای خود پکیح مورد نظر را انتخاب نمایند.
تست وبسرویس آی او تایپ
به منظور ارزیابی عملکرد api آی او تایپ ۳۰۰ توکن اولیه در کیف توکن توسعه دهندگان شارژ شده است.