{"openapi":"3.1.0","info":{"title":"Smarty Pants API","version":"1.0.0","description":"OpenAI-compatible inference on Apple Silicon Macs. Anyone can sign up with an email at https://smartypants.network/api. New accounts get $10 of free credit, usable for 90 days. Mac owners join separately, by invite. An MCP server with no-sign-in tools is at /mcp.","contact":{"name":"Smarty Pants","email":"info@howcan.io","url":"https://smartypants.network"},"termsOfService":"https://smartypants.network/legal"},"servers":[{"url":"https://smartypants.network"}],"externalDocs":{"description":"Agent brief","url":"https://smartypants.network/agents?format=json"},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from your account page."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}}},"Message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":["string","array","null"]},"tool_calls":{"type":"array","items":{"type":"object"}},"tool_call_id":{"type":"string"}}},"ChatCompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","examples":["smartypants/qwen3.5-4b"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"max_tokens":{"type":"integer","minimum":1},"temperature":{"type":"number"},"top_p":{"type":"number"},"stream":{"type":"boolean"},"tools":{"type":"array","items":{"type":"object"}},"tool_choice":{},"response_format":{"type":"object"},"stop":{},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"}},"description":"Smarty Pants extension: turn model thinking on or off."}}},"ChatCompletion":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"chat.completion"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/Message"},"finish_reason":{"type":"string"}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}},"Model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"context_length":{"type":"integer"},"max_completion_tokens":{"type":"integer"},"pricing":{"type":"object","description":"US dollars per token, as decimal strings.","properties":{"prompt":{"type":"string"},"completion":{"type":"string"}}},"supported_features":{"type":"array","items":{"type":"string"}},"is_ready":{"type":"boolean","description":"False means the model cannot take ordinary traffic right now."}}},"ModelWishRequest":{"type":"object","required":["model"],"properties":{"model":{"type":"string","maxLength":500,"description":"A Hugging Face, OpenRouter or OpenGateway link, an org/name id, or a model name."},"note":{"type":"string","maxLength":500},"from":{"type":"string","enum":["person","agent"]}}}}},"paths":{"/v1/models":{"get":{"operationId":"listModels","summary":"List models with prices, context size and readiness","security":[{"apiKey":[]}],"responses":{"200":{"description":"Models","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/key":{"get":{"operationId":"getKeyBudget","summary":"This key's spending limit, spend and what is left, plus the account balance","security":[{"apiKey":[]}],"responses":{"200":{"description":"Key budget","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object"},"account":{"type":"object"},"note":{"type":"string"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create a chat completion (OpenAI format)","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Completion, or a server-sent event stream when stream is true","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited or no capacity; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Model not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/model-wishes":{"get":{"operationId":"listModelWishes","summary":"List models people and agents have asked us to host","security":[],"responses":{"200":{"description":"Wishlist"}}},"post":{"operationId":"requestModel","summary":"Ask Smarty Pants to host a model (no sign-in)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelWishRequest"}}}},"responses":{"200":{"description":"Request recorded or vote added, with the instant Hugging Face check in status"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/model-wishes/{id}":{"get":{"operationId":"trackModelWish","summary":"Follow a model request: requested, checked (with each check and why), in testing, live","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Request status"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/first-shown":{"get":{"operationId":"listFirstShown","summary":"Models Smarty Pants served before any other provider, according to Hugging Face","security":[],"responses":{"200":{"description":"First Shown list"}}}},"/api/public/status":{"get":{"operationId":"getStatus","summary":"Live service status: Macs connected, models ready","security":[],"responses":{"200":{"description":"Status"}}}},"/api/public/state-machines":{"get":{"operationId":"getStateMachines","summary":"Stages and allowed moves for Mac status, model release and payouts","security":[],"responses":{"200":{"description":"State machines"}}}},"/agents":{"get":{"operationId":"getAgentBrief","summary":"Agent brief (add ?format=json)","security":[],"parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["json"]}}],"responses":{"200":{"description":"Brief"}}}},"/docs/agents":{"get":{"operationId":"getAgentDocs","summary":"Docs page for agents: copy-ready Python, JavaScript, curl and MCP examples","security":[],"responses":{"200":{"description":"HTML page"}}}},"/mcp":{"post":{"operationId":"mcp","summary":"MCP server (Streamable HTTP, JSON-RPC). Public tools need no sign-in.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC response"},"202":{"description":"Notification accepted"}}}}}}