{"components":{"securitySchemes":{"BearerAuth":{"bearerFormat":"AISA API Key","description":"Your AIsa API key as a Bearer token.","scheme":"bearer","type":"http"}}},"info":{"description":"Anthropic-compatible Messages API, exposed through AIsa. Send structured messages and generate responses using Claude models.","title":"Claude Messages API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/messages":{"post":{"description":"Send a structured conversation to a Claude model and receive a response. Compatible with the Anthropic Messages API.","operationId":"createMessage","requestBody":{"content":{"application/json":{"schema":{"properties":{"max_tokens":{"description":"Maximum number of tokens to generate before stopping.","example":1024,"type":"integer"},"messages":{"description":"Conversation turns.","example":[{"content":"Hello, Claude","role":"user"}],"items":{"properties":{"content":{"description":"String or array of content blocks.","oneOf":[{"type":"string"},{"items":{"type":"object"},"type":"array"}]},"role":{"enum":["user","assistant"],"type":"string"}},"required":["role","content"],"type":"object"},"type":"array"},"metadata":{"properties":{"user_id":{"description":"External user ID (no PII).","type":"string"}},"type":"object"},"model":{"description":"Claude model identifier. Examples: claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5-20251001.","example":"claude-sonnet-4-6","type":"string"},"service_tier":{"default":"auto","enum":["auto","standard_only"],"type":"string"},"stop_sequences":{"description":"Custom sequences that stop generation.","items":{"type":"string"},"type":"array"},"stream":{"default":false,"description":"Enable SSE streaming.","type":"boolean"},"system":{"description":"System prompt. String or array of text blocks.","oneOf":[{"type":"string"},{"items":{"type":"object"},"type":"array"}]},"temperature":{"default":1.0,"description":"Randomness. 0 = deterministic, 1 = creative.","format":"float","maximum":1.0,"minimum":0.0,"type":"number"},"thinking":{"description":"Enable extended thinking for complex reasoning.","properties":{"budget_tokens":{"example":10000,"type":"integer"},"display":{"enum":["summarized","omitted"],"type":"string"},"type":{"enum":["enabled"],"type":"string"}},"type":"object"},"tool_choice":{"description":"How the model uses tools.","properties":{"disable_parallel_tool_use":{"default":false,"type":"boolean"},"name":{"description":"Required when type is tool.","type":"string"},"type":{"enum":["auto","any","tool","none"],"type":"string"}},"type":"object"},"tools":{"description":"Tools the model may use.","items":{"properties":{"description":{"type":"string"},"input_schema":{"type":"object"},"name":{"type":"string"},"type":{"example":"custom","type":"string"}},"required":["name","input_schema"],"type":"object"},"type":"array"},"top_k":{"description":"Only sample from the top K options for each token.","type":"integer"},"top_p":{"description":"Nucleus sampling. Use instead of temperature.","format":"float","type":"number"}},"required":["model","max_tokens","messages"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"content":{"description":"Response content blocks (text, tool_use, thinking, etc.).","items":{"type":"object"},"type":"array"},"id":{"example":"msg_024e7cf42f5d47cfa6982b5ff8b55642","type":"string"},"model":{"example":"claude-sonnet-4-6","type":"string"},"role":{"example":"assistant","type":"string"},"stop_reason":{"enum":["end_turn","stop_sequence","max_tokens","tool_use"],"type":"string"},"stop_sequence":{"nullable":true,"type":"string"},"type":{"example":"message","type":"string"},"usage":{"properties":{"cache_creation_input_tokens":{"type":"integer"},"cache_read_input_tokens":{"type":"integer"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"type":"object"}},"type":"object"}}},"description":"Successful response"},"400":{"description":"Invalid request parameters"},"401":{"description":"Missing or invalid API key"},"429":{"description":"Rate limit exceeded"},"500":{"description":"Internal server error"}},"security":[{"BearerAuth":[]}],"summary":"Create a message"}}},"security":[{"BearerAuth":[]}],"servers":[{"url":"https://api.aisa.one/v1"}]}
