CodeGen 350M Mono

huggingface
Code

350M autoregressive code generation model from Salesforce, the smallest of the original CodeGen family. The mono variant was further trained on Python so it is well suited for short Python completions and program synthesis from a natural-language or code prompt.

Try CodeGen 350M Mono now
Send a single prompt and stream a response inline. Hit Cmd+Enter to submit.
Sign in to try this model with €5 free credits.
Sign in
Press Cmd+Enter to send
Response appears here.
TL;DR·Last updated June 24, 2026

CodeGen 350M Mono is code AI model from huggingface, priced at €0.300 per 1M input tokens with a 2.0K tokens context window.

About this model

CodeGen-350M-mono is the lightest checkpoint of Salesforce's CodeGen family of program-synthesis models. It started from the multilingual CodeGen base and was then fine-tuned on a large Python corpus, which makes the mono variant focused on Python code generation. With only 350M parameters it runs cheaply and is a common baseline for code-completion and text-to-code experiments, though its output quality trails much larger modern code models.
Try CodeGen 350M Mono
Sign in to generate — 50 free credits on sign-up

Pricing

Price per Generation
Per generationFree

API Integration

Use our OpenAI-compatible API to integrate CodeGen 350M Mono into your application.

Install
npm install railwail
JavaScript / TypeScript
import railwail from "railwail";

const rw = railwail("YOUR_API_KEY");

// Simple — just pass a string
const reply = await rw.run("codegen-350m-mono", "Hello! What can you do?");
console.log(reply);

// With message history
const reply2 = await rw.run("codegen-350m-mono", [
  { role: "system", content: "You are a helpful assistant." },
  { role: "user", content: "Explain quantum computing simply." },
]);
console.log(reply2);

// Full response with usage info
const res = await rw.chat("codegen-350m-mono", [
  { role: "user", content: "Hello!" },
], { temperature: 0.7, max_tokens: 500 });
console.log(res.choices[0].message.content);
console.log(res.usage);
Specifications
Context window
2,048 tokens
Developer
huggingface
Category
Code
Supported Formats
text
Tags
code
huggingface
salesforce
codegen
python
code-completion
open-source
small

Frequently asked questions

Start using CodeGen 350M Mono today

Get started with free credits. No credit card required. Access CodeGen 350M Mono and 100+ other models through a single API.