Learn how to use the Cairo Coder to generate Cairo Code in a few clicks.

Get Your API Key

1.

Access the Dashboard

Navigate to the Dashboard page.

2.

Create Your API Key

Click "Create API Key" and save it securely - it won't be shown again.

3.

Store it safely

Keep your API key secure and use it in your applications.

Note: Monitor your token usage to avoid hitting monthly limits. .

Generate Cairo Programs and Smart Contracts

Send a POST request to the completions endpoint with your contract requirements.

cURL Example
curl -X POST "https://api.cairo-coder.com/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "Write a simple Cairo contract that implements a counter"
      }
    ]
  }'