Midas Code API is now in public beta. Get started free
Quick-start code generation with any language.
Official client libraries for Python and TypeScript with first-class support for Go, Rust, and more. Get started in minutes.
Native client libraries for popular languages. REST API for everything else.
import midascode
client = midascode.Client(api_key="midas_your_key")
# Generate code from a prompt
response = client.generate(
prompt="Create a FastAPI endpoint for user authentication",
language="python",
context=open("app/main.py").read()
)
print(response.code)import { MidasCode } from "@midascode/sdk";
const client = new MidasCode({ apiKey: process.env.MIDAS_API_KEY });
// Stream the generated code in real time
const stream = await client.generate.stream({
prompt: "Create a React hook for pagination",
language: "typescript",
});
for await (const chunk of stream) {
process.stdout.write(chunk.delta);
}The SDK handles retries, rate limiting, authentication, and streaming. You focus on what you are building.
Configure once, use everywhere
# .env MIDAS_API_KEY=midas_your_key MIDAS_MODEL=midas-2 MIDAS_TIMEOUT=30 # The SDK picks these up automatically import midascode client = midascode.Client() # no args needed

Install in one command. Full documentation and examples available in our docs.