{"openapi":"3.1.0","info":{"title":"Mistral AI via Locus x402","version":"1.0.0","description":"Premier and open-weight LLMs — Mistral Medium 3.5, Small 4, Large 3, Ministral 3, Codestral, embeddings, and moderation.","contact":{"email":"api@paywithlocus.com"},"x-guidance":"Use the documented POST operations for Mistral AI. Send JSON matching each requestBody schema. Unpaid public x402 requests return an x402 v2 payment challenge; retry the same body with PAYMENT-SIGNATURE and the returned x-locus-request-id."},"servers":[{"url":"https://mistral.x402.stage.paywithlocus.com"}],"x-agentcash-guidance":{"llmsTxtUrl":"https://stage.paywithlocus.com/x402/mistral.md"},"x-service-info":{"categories":["ai"],"docs":{"homepage":"https://mistral.ai","apiReference":"https://docs.mistral.ai","llms":"https://stage.paywithlocus.com/x402/mistral.md"}},"paths":{"/mistral/chat":{"post":{"operationId":"mistral_chat","summary":"Chat Completion","description":"Create a chat completion. Supports function calling, JSON mode, structured output, vision, reasoning, web search, and document context.","tags":["AI / LLM"],"security":[],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001000"},"protocols":[{"x402":{}}],"x-locus":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","scheme":"upto","pricing":"metered","authorization":"maximum","settlement":"actual-usage","pricingVersion":"mistral-2026-08-21-v1","estimatedCost":"Usage-based; the 402 challenge advertises the authorization maximum"}},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model ID (e.g. \"mistral-medium-3-5\", \"mistral-small-2603\", \"mistral-large-2512\", \"ministral-14b-2512\", \"codestral-latest\")"},"messages":{"description":"Conversation messages array","type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":true}},"required":["type"],"additionalProperties":true}},{"type":"null"}]},"name":{"type":"string"},"tool_call_id":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["role"],"additionalProperties":true}},"max_tokens":{"type":"number","description":"Maximum output tokens. Required to bound metered x402 authorization."},"temperature":{"type":"number","description":"Sampling temperature (0-2)"},"top_p":{"type":"number","description":"Nucleus sampling (0-1)"},"tools":{"type":"array","items":{},"description":"Tool/function definitions"},"tool_choice":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":true}],"description":"Tool selection control"},"response_format":{"type":"object","additionalProperties":true,"description":"Output format (json_object, json_schema, text)"},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{}}],"description":"Stop sequences"},"seed":{"type":"number","description":"Deterministic sampling seed"}},"required":["model","messages","max_tokens"],"additionalProperties":true},"example":{"model":"mistral-medium-3-5","messages":[{"role":"user","content":"Reply with exactly the word PONG."}],"max_tokens":128}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true,"properties":{"choices":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"message":{"type":"object","additionalProperties":true,"properties":{"content":{"type":"string"}}}}}}},"description":"Partial response schema observed in an authenticated, semantically verified customer call. Only observed field types are described; optionality, other inputs and error states are not inferred."},"request":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"statusUrl":{"type":"string"}},"required":["id","statusUrl"],"additionalProperties":false},"payment":{"type":"object","properties":{"scheme":{"type":"string","enum":["exact","upto"]},"authorizedMaxUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"settledUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"capExhausted":{"type":"boolean"},"calculatedActualUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"usage":{}},"required":["scheme","authorizedMaxUsdc","settledUsdc"],"additionalProperties":false}},"required":["success","data","request","payment"],"additionalProperties":false}}}},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/mistral/embed":{"post":{"operationId":"mistral_embed","summary":"Embeddings","description":"Generate text or code embeddings. Returns 1024-dimensional vectors for retrieval, clustering, and classification.","tags":["AI / LLM"],"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.008000"},"protocols":[{"x402":{}}],"x-locus":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","scheme":"upto","pricing":"metered","authorization":"maximum","settlement":"actual-usage","pricingVersion":"mistral-2026-08-04-v1","estimatedCost":"Usage-based; the 402 challenge advertises the authorization maximum"}},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Embedding model (e.g. \"mistral-embed\", \"codestral-embed\")"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}}],"description":"Text(s) to embed (string or array of strings)"},"encoding_format":{"type":"string","description":"Output format: \"float\" (default) or \"base64\""}},"required":["model","input"],"additionalProperties":true},"example":{"model":"mistral-embed","input":["Hello from x402"]}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true,"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"embedding":{"type":"array","items":{"type":"number"}}}}}},"description":"Partial response schema observed in an authenticated, semantically verified customer call. Only observed field types are described; optionality, other inputs and error states are not inferred."},"request":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"statusUrl":{"type":"string"}},"required":["id","statusUrl"],"additionalProperties":false},"payment":{"type":"object","properties":{"scheme":{"type":"string","enum":["exact","upto"]},"authorizedMaxUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"settledUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"capExhausted":{"type":"boolean"},"calculatedActualUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"usage":{}},"required":["scheme","authorizedMaxUsdc","settledUsdc"],"additionalProperties":false}},"required":["success","data","request","payment"],"additionalProperties":false}}}},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/mistral/moderate":{"post":{"operationId":"mistral_moderate","summary":"Moderation","description":"Classify content for safety across categories: violence, hate speech, sexual content, self-harm, and more.","tags":["AI / LLM"],"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.008000"},"protocols":[{"x402":{}}],"x-locus":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","scheme":"exact","estimatedCost":"$0.008"}},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Moderation model (e.g. \"mistral-moderation-latest\")"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{}}],"description":"Text(s) to moderate (string or array of strings)"}},"required":["model","input"],"additionalProperties":true},"example":{"model":"mistral-moderation-latest","input":["Hello from x402"]}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true,"properties":{"results":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"categories":{"type":"object","additionalProperties":true}}}}},"description":"Partial response schema observed in an authenticated, semantically verified customer call. Only observed field types are described; optionality, other inputs and error states are not inferred."},"request":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"statusUrl":{"type":"string"}},"required":["id","statusUrl"],"additionalProperties":false},"payment":{"type":"object","properties":{"scheme":{"type":"string","enum":["exact","upto"]},"authorizedMaxUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"settledUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"capExhausted":{"type":"boolean"},"calculatedActualUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"usage":{}},"required":["scheme","authorizedMaxUsdc","settledUsdc"],"additionalProperties":false}},"required":["success","data","request","payment"],"additionalProperties":false}}}},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}},"/mistral/models":{"post":{"operationId":"mistral_models","summary":"List Models","description":"List all available Mistral models with metadata.","tags":["AI / LLM"],"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}],"x-locus":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","scheme":"exact","estimatedCost":"$0.005 fee only"}},"parameters":[{"name":"x-locus-request-id","in":"header","required":false,"description":"UUID returned by the initial 402. Echo it on the paid retry and later recovery attempts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true},"example":{}}}},"responses":{"200":{"description":"Successful response with PAYMENT-RESPONSE and durable request receipt","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true,"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}}},"description":"Partial response schema observed in an authenticated, semantically verified customer call. Only observed field types are described; optionality, other inputs and error states are not inferred."},"request":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"statusUrl":{"type":"string"}},"required":["id","statusUrl"],"additionalProperties":false},"payment":{"type":"object","properties":{"scheme":{"type":"string","enum":["exact","upto"]},"authorizedMaxUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"settledUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"capExhausted":{"type":"boolean"},"calculatedActualUsdc":{"type":"string","pattern":"^\\d+\\.\\d{6}$"},"usage":{}},"required":["scheme","authorizedMaxUsdc","settledUsdc"],"additionalProperties":false}},"required":["success","data","request","payment"],"additionalProperties":false}}}},"202":{"description":"The supplied request ID is already in progress"},"400":{"description":"Invalid request"},"402":{"description":"Payment Required"},"409":{"description":"Request ID conflict or terminal failed request"}}}}}}