CodyCodes.ai API & CLI Documentation

API Reference

Chat Endpoint

Endpoint: POST https://codycodes.ai/api/chat

Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body

{
  "provider": "cerebras",
  "model": "llama-3.3-70b",
  "temperature": 0.7,
  "messages": [
    { "role": "system", "content": "System prompt here." },
    { "role": "user", "content": "User message here." }
  ]
}

Response

{
  "choices": [
    { "message": { "content": "AI response here." } }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 456
  }
}

Command-Line Client (cody)

Installation

git clone https://github.com/codycodes-ai/codycli
cd codycli
make
./setup.sh

Usage

export CODYCODES_API_KEY="YOUR_API_KEY"
export cody="Your system prompt here"
export codybrain="llama-3.3-70b"

# Simple usage
./cody "Your prompt here"

# Usage with stdin
cat your_file.txt | ./cody "Summarize this file."

Example

./cody "What's the capital of France?"

# Response:
Paris is the capital of France.