01 / Quick start

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."}]
  }'
Store secrets in your host’s environment manager and rotate them from the workspace at platform.byteai.in.
Keys & sign-in

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.

02 / Chat completions

OpenAI-compatible chat, with Byte AI metadata.

POST/v1/chat/completionsRequires a key with the complete scope

Use 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.

autogeneralstudywritingemailresearchexam-papercodingbusiness

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.

Limited guest chat is available at 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":[…]}
}
03 / Search and source data

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":"…"}
  ]
}
GET/v1/modelsPublic model metadata

The model list reports the current default, release version, and capabilities.

04 / Endpoint catalog

Focused tools for real workflows.

POST/v1/tasks/complete

Run a focused text task with a system and user prompt.

POST/v1/tasks/compose

Draft a professional email from instructions and context.

POST/v1/tasks/reply

Draft a safe email reply with tone and instruction controls.

POST/v1/tasks/rewrite

Rewrite user supplied text in a selected style.

POST/v1/tasks/summarize

Summarize an email and list its key points or decisions.

POST/v1/tasks/suggest_replies

Suggest three concise email responses.

POST/v1/tasks/subject

Generate three email subject line options.

POST/v1/tasks/translate

Translate text into the requested language.

POST/v1/tasks/extract

Extract tasks, dates, and people from an email.

POST/v1/tasks/classify

Classify email priority, intent, and reply needs.

POST/v1/tasks/autoreply

Draft a conservative acknowledgement or return SKIP.

POST/v1/tasks/extract_questions

Extract, clean, and classify supported question formats.

POST/v1/tasks/refine_questions

Improve wording while preserving source meaning and intent.

POST/v1/tasks/structure_paper

Suggest paper sections, visual placement, and review flags.

POST/v1/tasks/generate_options

Generate answer options and a checked answer key.

POST/v1/vision/ocr

Transcribe scans and handwriting with confidence and review status.

POST/v1/vision/diagram/evaluate

Compare diagram evidence against supplied labels or criteria.

POST/v1/evaluations/subjective

Evaluate typed or transcribed responses against a rubric.

POST/v1/search

Search 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.

Quotas

Daily allowances.

WhoDaily limitResets
Guest chat (no account)25 messages24 hours after first use
Signed-in chat300 messages24 hours after first use
API key10,000 requestsDaily, 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].

05 / Reliability and review

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.

Errors & request IDs

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.

OpenAPI

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.ts
Support

Stuck? 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.

Byte AI API Documentation | Byte AI