# MarketAi > One OpenAI-compatible API for hundreds of AI models (chat and image), with prepaid credits. > You pay only for successful requests. Base URL: https://marketai.sassdesk.com/v1 Auth: header `Authorization: Bearer mk-...` (create keys in the dashboard: https://marketai.sassdesk.com/dashboard/keys) ## Endpoints - GET https://marketai.sassdesk.com/v1/models: every model id with its price per million tokens (USD) - POST https://marketai.sassdesk.com/v1/chat/completions: OpenAI chat format; `stream: true` for server-sent events - POST https://marketai.sassdesk.com/v1/images/generations: {"model", "prompt"}, n=1, returns data[0].b64_json ## Notes - Model ids look like `anthropic/claude-sonnet-4.5` or `google/gemini-3.5-flash`; list them first. - Every response carries `usage.cost` (USD charged) and `marketai_request_id`. - Errors use the OpenAI shape. 402 insufficient_credits: top up; 429: more than 60 requests a minute on one key. ## Example (Python, openai SDK) from openai import OpenAI client = OpenAI(base_url="https://marketai.sassdesk.com/v1", api_key="mk-...") r = client.chat.completions.create(model="openai/gpt-5-mini", messages=[{"role": "user", "content": "Hi"}]) ## Pages - Models and prices: https://marketai.sassdesk.com/models - Docs: https://marketai.sassdesk.com/docs