For User

get started with AiMo Network as client user

Welcome to AiMo Network - the decentralized intelligence marketplace with a permissionless unified API. Access hundreds of LLMs, tools, and agents through unified interfaces.

Quick Start

Get started in 3 simple steps and make your first API call in under 5 minutes.

Step 1: Create Your Account

Visit Console and sign up by connecting an external wallet (Base or Solana) or using social login, which automatically creates an embedded wallet for you.

Step 2: Fund Your Account

Deposit USDC into your self-custodial wallet at Credits. Your funds remain in your own wallet until the moment of use.

Step 3: Generate a Payment Delegation Key (PDK)

  1. Go to Keys
  2. Click "Generate PDK"
  3. Configure permissions (spending limits, expiration, allowed recipients)
  4. Copy your PDK (format: aimo-p-[base58-encoded-key])

A PDK lets AI agents pay for services on your behalf without giving them full control of your wallet. Learn more about how PDKs work and advanced configuration options in the Payment Delegation Key guide.

PDK is optional — for fully permissionless access, you can use AiMo Network directly with any EVM or Solana signer. We recommend using the aimo-sdk for the best experience. When using a raw signer, the base URL is https://beta.aimo.network; when using a PDK, the base URL is https://api.console.aimo.network/v1. See the SDK Reference to learn more.

Making Your First Request

Want to try it out without writing code? Experiment with models directly in the AiMo Playground.

The examples below use the chat completions endpoint for models. AiMo Network also supports tools (MCP) and agents (A2A). See Models, Tools, & Agents for all available service primitives and endpoints.

Basic Example

curl -X POST "https://api.console.aimo.network/v1/chat/completions" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5",
    "messages": [
      {"role": "user", "content": "Hello! What can you help me with?"}
    ],
    "max_tokens": 200
  }'

Code Examples

const response = await fetch('https://api.console.aimo.network/v1/chat/completions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer aimo-p-[your-api-key]',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'anthropic/claude-opus-4.6',
    messages: [
      { role: 'user', content: 'Explain how AiMo Network works' }
    ],
    max_tokens: 300
  })
});

const data = await response.json();
console.log(data.choices[0].message.content);
import requests

response = requests.post(
    'https://api.console.aimo.network/v1/chat/completions',
    headers={
        'Authorization': 'Bearer aimo-p-[your-api-key]',
        'Content-Type': 'application/json'
    },
    json={
        'model': 'openai/gpt-5',
        'messages': [
            {'role': 'user', 'content': 'What is quantum computing?'}
        ],
        'max_tokens': 300
    }
)

result = response.json()
print(result['choices'][0]['message']['content'])

Streaming

For real-time, token-by-token responses, add stream: true to your request. Responses use the Server-Sent Events format:

const response = await fetch('https://api.console.aimo.network/v1/chat/completions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer aimo-p-[your-api-key]',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'anthropic/claude-opus-4.6',
    messages: [{ role: 'user', content: 'Tell me a short story' }],
    stream: true,
    max_tokens: 500
  })
});

const reader = response.body.getReader();
const decoder = new TextDecoder();

while (true) {
  const { done, value } = await reader.read();
  if (done) break;

  const lines = decoder.decode(value).split('\n').filter(line => line.trim());
  for (const line of lines) {
    if (line.startsWith('data: ') && line.slice(6) !== '[DONE]') {
      const content = JSON.parse(line.slice(6)).choices[0]?.delta?.content;
      if (content) process.stdout.write(content);
    }
  }
}
import requests
import json

response = requests.post(
    'https://api.console.aimo.network/v1/chat/completions',
    headers={
        'Authorization': 'Bearer aimo-p-[your-api-key]',
        'Content-Type': 'application/json'
    },
    json={
        'model': 'openai/gpt-5',
        'messages': [{'role': 'user', 'content': 'Tell me a story'}],
        'stream': True,
        'max_tokens': 500
    },
    stream=True
)

for line in response.iter_lines():
    if line:
        line = line.decode('utf-8')
        if line.startswith('data: '):
            data = line[6:]
            if data == '[DONE]':
                break
            content = json.loads(data)['choices'][0]['delta'].get('content', '')
            if content:
                print(content, end='', flush=True)

Each SSE message contains a JSON chunk with choices[0].delta.content. The stream ends with data: [DONE].

Multi-Modal Generation

AiMo Network supports image generation, image editing, and video generation alongside chat completions.

The examples below show the most common parameters. For full parameter documentation, see the API Reference.

Generating Images

Use POST /image/generate to create images from a text prompt. By default, the response returns a JSON object with base64-encoded data URLs.

curl -X POST "https://api.console.aimo.network/v1/image/generate" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dall-e-3",
    "prompt": "A futuristic cityscape at sunset",
    "width": "1024",
    "height": "1024",
    "output_format": "png"
  }'
const response = await fetch('https://api.console.aimo.network/v1/image/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer aimo-p-[your-api-key]',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'dall-e-3',
    prompt: 'A futuristic cityscape at sunset',
    width: '1024',
    height: '1024',
    output_format: 'png'
  })
});

const data = await response.json();
// data.images[0].data_url contains "data:image/png;base64,..."
console.log(data.images[0].data_url);
import requests

response = requests.post(
    'https://api.console.aimo.network/v1/image/generate',
    headers={
        'Authorization': 'Bearer aimo-p-[your-api-key]',
        'Content-Type': 'application/json'
    },
    json={
        'model': 'dall-e-3',
        'prompt': 'A futuristic cityscape at sunset',
        'width': '1024',
        'height': '1024',
        'output_format': 'png'
    }
)

data = response.json()
# data['images'][0]['data_url'] contains "data:image/png;base64,..."
print(data['images'][0]['data_url'])

Set "output_type": "file" to receive the raw binary image directly instead of JSON. File mode only supports a single image (n = 1).

Editing Images

Use POST /image/edit to edit or inpaint an existing image. Provide the base image as a base64 data URL, and optionally include a mask for inpainting (transparent regions are edited, opaque regions are kept).

curl -X POST "https://api.console.aimo.network/v1/image/edit" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-fill",
    "images": [{ "b64": "data:image/png;base64,..." }],
    "mask": { "b64": "data:image/png;base64,..." },
    "prompt": "Replace the sky with a starry night"
  }'

See the Image Edit API Reference for full parameter details.

Generating Videos

Video generation is asynchronous. You submit a job, poll for progress, and retrieve the result when ready.

Step 1 — Queue a job:

curl -X POST "https://api.console.aimo.network/v1/video/queue" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v2",
    "prompt": "A drone flyover of a mountain landscape",
    "duration": "5s",
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'

The response returns a task_id you'll use to check status:

{
  "id": "<task_id>",
  "status": "queued",
  "variants_expected": 1
}

Step 2 — Poll for results:

curl -X POST "https://api.console.aimo.network/v1/video/retrieve" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{
    "task_id": "<task_id>"
  }'

While generating, the response includes status, progress (0.0–1.0), and estimated_seconds. Once complete, the raw MP4 binary is returned directly.

Step 3 — Clean up:

After downloading the video, signal completion to free server-side resources:

curl -X POST "https://api.console.aimo.network/v1/video/complete" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v2",
    "queue_id": "<task_id>"
  }'

See the Video API Reference for all parameters including image-to-video, reference images, and audio generation.

Estimating Costs

Use the quote endpoints to get price estimates before committing to a generation:

# Image generation quote
curl -X POST "https://api.console.aimo.network/v1/image/generate/quote" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{ "model": "dall-e-3", "width": 1024, "height": 1024 }'

# Video generation quote
curl -X POST "https://api.console.aimo.network/v1/video/quote" \
  -H "Authorization: Bearer aimo-p-[your-api-key]" \
  -H "Content-Type: application/json" \
  -d '{ "model": "kling-v2", "duration": "5s", "resolution": "720p" }'

Both return { "price_usd": <amount> } with the estimated cost in USD.

Using the TypeScript SDK

For TypeScript/JavaScript applications, the official SDK provides a simpler integration with automatic authentication and payment handling:

npm install @aimo.network/client @aimo.network/svm
import { AimoClient } from "@aimo.network/client";
import { SvmClientSigner, SOLANA_MAINNET_CHAIN_ID } from "@aimo.network/svm";
import { createKeyPairSignerFromBytes } from "@solana/kit";
import bs58 from "bs58";

// If using PDK from the console
// Use the console base URL: https://api.console.aimo.network/v1
// Authentication is handled via your PDK
import { AimoClient } from "@aimo.network/client";
import { SvmClientSigner, SOLANA_MAINNET_CHAIN_ID } from "@aimo.network/svm";
import { createKeyPairSignerFromBytes } from "@solana/kit";
import bs58 from "bs58";

// Load your wallet keypair
const privateKeyBytes = bs58.decode(process.env.SOLANA_PRIVATE_KEY);
const keypairSigner = await createKeyPairSignerFromBytes(privateKeyBytes);

// Create signer
const signer = new SvmClientSigner({
  signer: keypairSigner,
  chainId: SOLANA_MAINNET_CHAIN_ID,
});

// Create client (permissionless router)
const client = new AimoClient({
  signer,
  baseUrl: "https://beta.aimo.network",
});

// Check balance
const balance = await client.sessionBalance();
console.log(`Balance: ${balance.balance_usd}`);

// Make chat completion
const response = await client.chatCompletions({
  model: "openai/gpt-5",
  messages: [{ role: "user", content: "Hello!" }],
});

const data = await response.json();
console.log(data.choices[0].message.content);

// Streaming
const streamResponse = await client.chatCompletions({
  model: "openai/gpt-5",
  messages: [{ role: "user", content: "Tell me a story" }],
  stream: true,
});

const reader = streamResponse.body.getReader();
const decoder = new TextDecoder();

while (true) {
  const { done, value } = await reader.read();
  if (done) break;

  const chunk = decoder.decode(value);
  const lines = chunk.split('\n').filter(line => line.trim());
  
  for (const line of lines) {
    if (line.startsWith('data: ') && line.slice(6) !== '[DONE]') {
      const data = JSON.parse(line.slice(6));
      const content = data.choices[0]?.delta?.content;
      if (content) {
        process.stdout.write(content);
      }
    }
  }
}

With Vercel AI SDK:

npm install @aimo.network/provider ai
import { aimoNetwork } from "@aimo.network/provider";
import { SvmClientSigner, SOLANA_MAINNET_CHAIN_ID } from "@aimo.network/svm";
import { generateText } from "ai";

// ... create signer as above ...

const aimo = aimoNetwork({
  signer,
  baseURL: "https://beta.aimo.network",
});

const result = await generateText({
  model: aimo.chat("openai/gpt-5"),
  prompt: "What is AiMo Network?",
});

console.log(result.text);

See the SDK Reference for complete documentation.

Available Models

Discovering Models

List all models via API:

curl "https://api.console.aimo.network/v1/models" \
  -H "Authorization: Bearer aimo-p-[your-api-key]"

Filter by type using the type query parameter (chat, image, image_edit, video, or all):

# List only image generation models
curl "https://api.console.aimo.network/v1/models?type=image" \
  -H "Authorization: Bearer aimo-p-[your-api-key]"

# List only video generation models
curl "https://api.console.aimo.network/v1/models?type=video" \
  -H "Authorization: Bearer aimo-p-[your-api-key]"

Browse visually:

Visit Marketplace to explore all available models with their capabilities and pricing.

Model Specification

Specify models in two ways:

1. Intelligent Routing (Recommended):

{
  "model": "openai/gpt-5"
}

The system automatically routes to the best available provider.

2. Direct Provider:

{
  "model": "provider_pubkey:model_name"
}

Route directly to a specific provider. Find provider public keys at the marketplace.

Request Parameters

Standard OpenAI-compatible parameters are supported:

{
  "model": "openai/gpt-5",           // Required: Model identifier
  "messages": [                        // Required: Conversation messages
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ],
  "stream": false,                     // Optional: Enable streaming (default: false)
  "max_tokens": 500,                   // Optional: Maximum tokens to generate
  "temperature": 0.7,                  // Optional: Sampling temperature (0.0-2.0)
  "top_p": 1.0,                        // Optional: Nucleus sampling
  "frequency_penalty": 0.0,            // Optional: Frequency penalty
  "presence_penalty": 0.0              // Optional: Presence penalty
}

Authentication & Security

Manage your PDKs and API keys at the Dashboard — generate new keys, monitor usage, and revoke compromised ones.

Store keys securely using environment variables. Never commit them to version control or expose them in client-side code. If a key is compromised, revoke it immediately from the dashboard and generate a replacement.

export AIMO_API_KEY="aimo-p-[your-key]"

Usage & Billing

How Costs Work

Payments are calculated based on the type of request:

  • Chat Completions: Billed per token (input + output). Each provider sets their own per-token pricing.
  • Image Generation & Editing: Billed per generation. Pricing varies by model and resolution.
  • Video Generation: Billed per generation based on resolution and duration (e.g., 720p/5s vs 1080p/10s).

Use the quote endpoints to get exact price estimates before committing to a generation.

Monitor Your Usage

Track your spending and usage at Usage:

  • Current balance
  • Usage history
  • Spending by model
  • Transaction history

Funding Your Account

Add USDC to your wallet through:

  • Apple Pay / Google Pay - Buy USDC directly from your mobile wallet
  • Bank Transfer - Fund via bank transfer
  • Wallet Transfer - Send USDC from any Solana or Base wallet

AiMo Network service fees do not include on/off ramp costs. Any fees from funding methods (e.g., card processing, bank transfer) are separate.

Supported Networks:

  • Solana Mainnet (USDC)
  • Base Mainnet (USDC)

AiMo Network works seamlessly with popular AI frameworks:

OpenAI SDK

import OpenAI from 'openai';

const openai = new OpenAI({
  apiKey: process.env.AIMO_API_KEY,
  baseURL: 'https://api.console.aimo.network/v1'
});

const completion = await openai.chat.completions.create({
  model: 'openai/gpt-5',
  messages: [{ role: 'user', content: 'Hello!' }]
});

LangChain

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="openai/gpt-5",
    openai_api_key="aimo-p-[your-key]",
    openai_api_base="https://api.console.aimo.network/v1"
)

response = llm.invoke("What is AiMo Network?")

Vercel AI SDK

import { openai } from '@ai-sdk/openai';
import { generateText } from 'ai';

const { text } = await generateText({
  model: openai('gpt-5', {
    baseURL: 'https://api.console.aimo.network/v1',
    apiKey: process.env.AIMO_API_KEY
  }),
  prompt: 'Explain quantum computing'
});

See more integrations: Integrations Guide

Troubleshooting

If you encounter any issues, please reach out to us on Discord or Telegram. Our team is happy to help you debug and resolve any problems.

What's Next?

  • Tutorial - Integration guides for OpenAI SDK, LangChain, Vercel AI SDK, and more
  • API Reference - Complete technical documentation
  • Provider Guide - Want to become a provider? Learn how to offer your models
  • AI Agent Guide - Onboard autonomous AI agents to AiMo Network

On this page