Keep your key on your server.
Create a scoped key in the Byte AI workspace. Send it as a bearer token from your backend. Do not put API keys in browser code or mobile bundles.
curl https://platform.byteai.in/v1/chat/completions \
-H "Authorization: Bearer $BYTEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-gray",
"messages": [{"role":"user","content":"Explain this clearly."}]
}'Base URL, keys and workspace sign-in.
All endpoints live under https://platform.byteai.in/v1. The older https://api.byteai.in/v1 keeps working for existing integrations.
Sign in to the workspace with your email: Byte AI sends a 6-digit code and a one-time link from [email protected]. Both expire after 15 minutes. Create keys at platform.byteai.in/dashboard; each key is shown once, can be scoped to complete, vision and search, and can be revoked at any time.
OpenAI-compatible chat, with Byte AI metadata.
/v1/chat/completionsRequires a key with the complete scopeUse gpt-gray or gpt-gray-1.0. Requests accept a conversation, optional specialization, optional web search, and a streaming flag. The response follows the chat completion shape and includes model version and Byte AI source metadata.
{
"model": "gpt-gray",
"messages": [{"role":"user","content":"What changed recently?"}],
"web_search": "auto",
"specialization": "auto",
"stream": false
}specialization picks how GPT Gray answers. Leave it out or send "auto" and Byte AI detects the task from the last message. The detected task comes back as byteai.task.
web_search accepts "auto", "always" (or true) and "never" (or false, the default). With "auto", Byte AI searches when a question is time-sensitive, and if its first answer admits it doesn’t know, it searches and answers again. byteai.searched tells you whether it did.
When streaming is enabled, the endpoint emits server-sent event chunks and ends with [DONE]. Byte AI also emits source metadata in a byteai field. Search availability depends on server configuration; never treat web page text as instructions.
POST /v1/public/chat without an API key. It has a smaller daily allowance. Product integrations should use the authenticated chat completions endpoint above.{
"id": "chatcmpl_…",
"object": "chat.completion",
"model": "gpt-gray",
"model_version": "1.0",
"choices": [{"message":{"role":"assistant","content":"…"},"finish_reason":"stop"}],
"byteai": {"task":"research","searched":true,"search_provider":"…","grounded":true,"sources":[…]}
}Search the web. Read any link.
For product-integrated research, call chat with web_search: true or use POST /v1/search. Source results are returned separately so your application can render links and review them.
Link reading: when the latest user message contains https:// links (up to two), Byte AI visits each page, extracts its text, and adds it as a numbered source with "kind": "page". Search results carry "kind": "search". Private, local and internal hosts are refused, redirects are re-validated, and responses over 1 MB are dropped. If a page cannot be read, the model is told to say so rather than guess.
"byteai": {
"search_provider": "duckduckgo",
"grounded": true,
"sources": [
{"id":1,"kind":"page","title":"…","url":"https://example.com","snippet":"…"},
{"id":2,"kind":"search","title":"…","url":"https://…","snippet":"…"}
]
}/v1/modelsPublic model metadataThe model list reports the current default, release version, and capabilities.
Focused tools for real workflows.
/v1/tasks/completeRun a focused text task with a system and user prompt.
/v1/tasks/composeDraft a professional email from instructions and context.
/v1/tasks/replyDraft a safe email reply with tone and instruction controls.
/v1/tasks/rewriteRewrite user supplied text in a selected style.
/v1/tasks/summarizeSummarize an email and list its key points or decisions.
/v1/tasks/suggest_repliesSuggest three concise email responses.
/v1/tasks/subjectGenerate three email subject line options.
/v1/tasks/translateTranslate text into the requested language.
/v1/tasks/extractExtract tasks, dates, and people from an email.
/v1/tasks/classifyClassify email priority, intent, and reply needs.
/v1/tasks/autoreplyDraft a conservative acknowledgement or return SKIP.
/v1/tasks/extract_questionsExtract, clean, and classify supported question formats.
/v1/tasks/refine_questionsImprove wording while preserving source meaning and intent.
/v1/tasks/structure_paperSuggest paper sections, visual placement, and review flags.
/v1/tasks/generate_optionsGenerate answer options and a checked answer key.
/v1/vision/ocrTranscribe scans and handwriting with confidence and review status.
/v1/vision/diagram/evaluateCompare diagram evidence against supplied labels or criteria.
/v1/evaluations/subjectiveEvaluate typed or transcribed responses against a rubric.
/v1/searchSearch the web (Cloudflare, Tavily, Brave, DuckDuckGo, Wikipedia) and return source metadata.
All /v1/tasks/:task requests require the complete scope. Vision endpoints require vision; web search accepts a search scoped key or a Byte AI session. Task and vision endpoints use JSON request and response bodies. Check the task schema before sending data. Image endpoints accept supported image inputs and return uncertainty or review flags where applicable.
Daily allowances.
| Who | Daily limit | Resets |
|---|---|---|
| Guest chat (no account) | 25 messages | 24 hours after first use |
| Signed-in chat | 300 messages | 24 hours after first use |
| API key | 10,000 requests | Daily, per key |
Every API-key response includes x-ratelimit-limit, x-ratelimit-remaining and x-ratelimit-reset (Unix time, midnight UTC). When a limit is reached the API returns 429 daily_limit_reached with a retry-after header. Need more? Email [email protected].
Errors should be actionable.
Common responses include 400 invalid_input, 401 unauthorized, 429 daily_limit_reached, 502 generation_failed, and 503 temporarily_unavailable. Retry transient 502/503 responses with bounded exponential backoff and an idempotency strategy where your workflow supports one.
Text extraction, OCR, diagram interpretation, and subjective scoring can be uncertain. Byte AI returns confidence guidance or review flags where available. Keep a human review step for consequential grading and source-sensitive outputs.
Every error explains itself.
Errors return a stable machine-readable error code, a human-readable message and the request_id. Every response also carries an x-request-id header. Send your own x-request-id (8–64 letters, digits, _ . : -) to trace a call through your logs.
HTTP/1.1 429 Too Many Requests
x-request-id: req_3f9c…
x-ratelimit-limit: 10000
x-ratelimit-remaining: 0
retry-after: 5400
{
"error": "daily_limit_reached",
"message": "The daily request limit for this key has been reached. It resets at midnight UTC (see x-ratelimit-reset).",
"request_id": "req_3f9c…"
}Retry 503 busy and 503 temporarily_unavailable with exponential backoff. Do not retry 400 or 401 unchanged.
Machine-readable spec.
An OpenAPI 3.1 document is served at /v1/openapi.json. Import it into Postman or Insomnia, or generate a typed client.
npx openapi-typescript https://platform.byteai.in/v1/openapi.json -o byteai.d.tsStuck? Write to us.
Email [email protected] with the endpoint, the request ID or time, and the error you received. Never send full API keys; the key prefix is enough. Byte AI is built and supported by ByteLabs.