The GAIA API Server exposes GAIA agents as “models” through an OpenAI-compatible REST API, enabling integration with VSCode extensions and other OpenAI-compatible clients.
from openai import OpenAIclient = OpenAI( base_url="http://localhost:8080/v1", api_key="not-needed")response = client.chat.completions.create( model="gaia-code", messages=[{"role": "user", "content": "Create a REST API with Express and SQLite"}])print(response.choices[0].message.content)
const axios = require('axios');async function chat(message) { const response = await axios.post( 'http://localhost:8080/v1/chat/completions', { model: 'gaia-code', messages: [{ role: 'user', content: message }] } ); return response.data.choices[0].message.content;}chat('Build me a todo app using nextjs').then(console.log);chat('Write a Python function to calculate factorial').then(console.log);
Autonomous Python/TypeScript development agent with intelligent routing
Property
Value
Model ID
gaia-code
Context
32K input / 8K output
Requirements
Lemonade with --ctx-size 32768
Description
Autonomous development agent with planning, generation, and testing
Intelligent Routing: The gaia-code model uses GAIA’s Routing Agent to automatically detect your target programming language (Python or TypeScript) and project type based on framework mentions.→ Learn about Routing