Skip to main content
The API takes OpenAI’s request shapes and returns OpenAI’s response shapes. The OpenAI SDKs work with the base URL set to https://sharemy.ai/v1.

Basics

  • Use https://sharemy.ai/v1 as the SDK base URL. Calling /v1 itself returns a 404 that lists the endpoints.
  • The catalogue is public. Job requests use Authorization: Bearer smai_.... Each account shares four job slots across its tokens. See Authentication.
  • Send JSON for chat and speech. Image generations take JSON or multipart form data. Top-level JSON fields set to null are treated as omitted. Image edits and audio uploads take multipart/form-data.
  • Browsers can call from any origin. The API allows GET, HEAD, POST and OPTIONS, and echoes the request headers named in a CORS preflight.
  • Catalogue and job responses use Cache-Control: no-store.
  • Job prices depend on the request. Failed or cancelled jobs are refunded. See Credits and pricing.
  • An unknown path gets 404 not_found. A wrong method on a known path gets 405 method_not_allowed with an Allow header. See Errors and limits.

Response headers

Browser JavaScript can read these headers across origins.

Differences from OpenAI’s API

ShareMyAI runs small open models on people’s own machines, so it covers part of OpenAI’s API.
  • The API omits OpenAI’s embeddings, moderations, files, assistants, responses and realtime endpoints.
  • Each model id works only on its own endpoint. GET /v1/models gives each model’s kind.
  • Chat is text only. Use one completion per call. Chat supports stop strings. JSON mode and required or named tool calls return 400 unsupported_value.
  • Generated and edited pictures come back as b64_json. Image URLs and variations are unsupported.
  • Speech comes back only as WAV or raw PCM, and Kokoro accepts OpenAI voice aliases.
  • Transcripts have segment timestamps only, not word timestamps.
  • Chat pricing uses the requested output budget after capping. Token counts in usage can be estimates.
Each endpoint page lists its own differences.

Things only ShareMyAI has

  • reasoning_content on chat replies from models that think.
  • seed on image generation requests and responses.
  • grow on image edits. Image jobs let you poll or cancel edits and generations.
  • diarize on transcriptions and translations, to label who spoke.
  • Model pricing, machine counts and chat token limits in the catalogue.
  • usage.cost_credits on chat completions and on the optional final usage chunk.