CamoCopy API Quickstart
Welcome to the CamoCopy API
CamoCopy provides state-of-the-art language models through a simple, OpenAI-compatible API. This guide will help you get started with our services quickly and efficiently.
Our API is 100% compatible with the OpenAI API structure, making migration seamless. Simply change your endpoint URL to https://api-v1.camocopy.com
and start using our powerful models.
In addition to the models available through our standard API, we offer dedicated GPU solutions tailored to your needs. To access our exclusive EU-hosted GPU infrastructure, which enables the use of specialised models beyond our standard offering, please contact us via our enterprise email address.
Authentication
All API requests should include your API key in an Authorization
HTTP header as follows:
Authorization: Bearer CAMOCOPY_API_KEY
Get your API key from the CamoCopy Dashboard. Keep your API key secure and never share it publicly.
Making Your First Request
You can paste the command below into your terminal to run your first API request. Make sure to replace $CAMOCOPY_API_KEY
with your secret API key.
curl https://api-v1.camocopy.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CAMOCOPY_API_KEY" \
-d '{
"model": "llama-3.3-70b",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}'
Response
This request queries the llama-3.3-70b model to complete the text starting with a prompt of "Say this is a test". You should get a response back that resembles the following:
{
"id": "private-1",
"object": "chat.completion",
"created": 1677858242,
"model": "llama-3.3-70b",
"usage": {
"prompt_tokens": 13,
"completion_tokens": 7,
"total_tokens": 20
},
"choices": [
{
"message": {
"role": "assistant",
"content": "This is a test!"
},
"finish_reason": "stop",
"index": 0
}
]
}
Now that you've generated your first chat completion, let's understand the response object:
- The
usage
object provides token usage information for billing purposes.
Chat Completions API
Overview
The Chat Completions API is the core of CamoCopy's offerings. It allows you to have dynamic, conversational interactions with our models. The API is designed to be simple yet powerful, enabling a wide range of applications.
Endpoint
All chat completion requests should be sent to:
https://api-v1.camocopy.com/v1/chat/completions
Request Format
The request body must be a JSON object with the following structure:
Parameter | Type | Required | Description |
---|---|---|---|
model | string | Required | ID of the model to use (e.g., "llama-3.3-70b") |
messages | array | Required | Array of message objects representing the conversation history |
temperature | number | Optional | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default is 1. |
top_p | number | Optional | An alternative to sampling with temperature, called nucleus sampling. Default is 1. |
stream | boolean | Optional | If set to true, partial message deltas will be sent. Default is false. |
max_tokens | integer | Optional | The maximum number of tokens to generate in the chat completion. |
presence_penalty | number | Optional | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far. Default is 0. |
frequency_penalty | number | Optional | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far. Default is 0. |
Messages Array
The messages array is a list of message objects that represent a conversation. Each message has the following structure:
{
"role": "user" | "system" | "assistant",
"content": "The content of the message"
}
The available roles are:
- system: Sets the behavior of the assistant. Include it as the first message.
- user: Represents the user in the conversation.
- assistant: Represents previous responses from the assistant.
Streaming Responses
CamoCopy API provides the ability to stream responses back to a client in order to allow partial results. To enable streaming, set the stream
parameter to true
.
import requests
def stream_chat_completion():
url = "https://api-v1.camocopy.com/v1/chat/completions"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {CAMOCOPY_API_KEY}"
}
data = {
"model": "llama-3.3-70b",
"messages": [{"role": "system", "content": "You are a creative assistant."},{"role": "user", "content": "Write a poem about AI"}],
"stream": True
}
response = requests.post(url, headers=headers, json=data, stream=True)
for line in response.iter_lines():
if line:
# Process each chunk of the stream
print(line.decode('utf-8'))
stream_chat_completion()
CamoCopy also supports vision models such as 'Pixtral-12B-2409', which is ideal for image analysis.
import requests
import base64
import json
# --- User Configuration ---
# 1. Replace with your actual API key
CAMOCOPY_API_KEY = "YOUR_API_KEY_HERE"
# 2. Provide the path to your local image file
IMAGE_PATH = "path/to/your/image.jpg" # e.g., "C:/Users/Test/Pictures/cat.jpg" or "/home/user/photo.png"
# 3. Your text prompt
PROMPT_TEXT = "What is in this picture? Be descriptive."
# --- Helper Function ---
def encode_image_to_base64(image_path):
"""Reads an image file and returns its Base64 encoded string."""
try:
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode('utf-8')
except FileNotFoundError:
print(f"Error: The file '{image_path}' was not found.")
return None
# --- Main API Call Function ---
def get_chat_completion():
"""
Sends a non-streaming request with an image to the chat completions endpoint.
"""
# Endpoint URL
url = "https://api-v1.camocopy.com/v1/chat/completions"
# Set up the headers with your API key
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {CAMOCOPY_API_KEY}"
}
# Encode the image to Base64
base64_image = encode_image_to_base64(IMAGE_PATH)
if base64_image is None:
return # Exit if image encoding failed
# IMPORTANT: The image must be sent as a Base64-encoded string within a data URI.
# The 'content' field for the user message must be an array of parts (text and image).
data = {
"model": "pixtral-12b-2409", # Or any other vision-capable model we support
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": PROMPT_TEXT
},
{
"type": "image_url",
"image_url": {
# Constructing the data URI with the base64 string
"url": f"data:image/jpeg;base64,{base64_image}"
}
}
]
}
],
# Set stream to False to get the full response at once
"stream": False,
"max_tokens": 1024 # Optional: set a token limit
}
# Make the POST request
try:
response = requests.post(url, headers=headers, json=data)
# Raise an exception for bad status codes (4xx or 5xx)
response.raise_for_status()
# Parse the JSON response
response_json = response.json()
# Print the full response for inspection
print("--- Full API Response (JSON) ---")
print(json.dumps(response_json, indent=2))
# Extract and print just the message content
print("\n--- Model's Message ---")
message_content = response_json['choices'][0]['message']['content']
print(message_content)
except requests.exceptions.RequestException as e:
print(f"An error occurred during the API request: {e}")
except KeyError:
print("Error: Could not find 'content' in the response. The response format may be different.")
except json.JSONDecodeError:
print(f"Error: Failed to decode JSON. Response was: {response.text}")
# --- Run the example ---
if __name__ == "__main__":
if CAMOCOPY_API_KEY == "YOUR_API_KEY_HERE":
print("Please replace 'YOUR_API_KEY_HERE' with your actual API key.")
elif "path/to/your/image.jpg" in IMAGE_PATH:
print("Please update the 'IMAGE_PATH' to a valid file path on your computer.")
else:
get_chat_completion()
Access the web with AI
Internet access
Harness advanced AI capabilities with real-time web knowledge. Our API delivers comprehensive internet resources tailored to your specific queries. Choose between two distinct possibilities: rapid, concise information with relevant links for time-sensitive needs, or in-depth, comprehensive analysis and detailed up to date answers for more thorough and factual research requirements.
Making A Request With Web Access
Execute the command below in your terminal to initiate your first API request with web access capabilities. Ensure you replace $CAMOCOPY_API_KEY
with your unique secret API key for proper authentication.
For each model in our ecosystem, append the model identifier with specific suffixes to determine the type of web integration: "-online" for expedited internet source retrieval or "-deep" for comprehensive, fact-enriched responses with extended contextual understanding.
For example:
- llama-3.3-70b-online
Example: Use the -online extension when you need a single, quick piece of real-time information, such as the current price of bitcoin or who won a particular football match today.
and
- llama-3.3-70b-deep
Example: Use the -deep extension if you need more detailed research, such as weather information, the current top 10 companies by market capitalisation, or the details of today's specific football match.
curl https://example.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CAMOCOPY_API_KEY" \
-d '{
"model": "llama-3.3-70b-online",
"messages": [{"role": "user", "content": "How rich is Jeff Bezos and who is he?"}],
"temperature": 0.7
}'
Response
This API request engages the llama-3.3-70b-online model to process and respond to the query "How rich is Jeff Bezos and who is he?". You will receive a current, up-to-date response that includes verified information along with cited sources. The response structure will resemble the following format:
Stream=False{
"id": "private-1",
"object": "chat.completion",
"created": 1677858242,
"model": "llama-3.3-70b-online",
"usage": {
"prompt_tokens": 13,
"completion_tokens": 7,
"total_tokens": 20
},
"choices": [
{
"message": {
"role": "assistant",
"content": "Net Worth: $227 Billion (as of March 2, 2025). Jeff Bezos is the founder of Amazon, which he started in 1994 from his garage in Seattle. He transitioned from CEO to executive chairman in 2021.."
},
"finish_reason": "stop",
"index": 0
}
],
"links": [
"https://www.forbes.com/profile/jeff-bezos/",
"https://en.wikipedia.org/wiki/Jeff_Bezos",
"https://www.britannica.com/money/Jeff-Bezos"
]
}
{
"id": "private-1",
"object": "chat.completion",
"model": "llama-3.3-70b-online",
"choices": [
{
"index": 0,
"finish_reason": null,
"delta": {
"content": "Jeff B",
"links": [
"https://www.forbes.com/profile/jeff-bezos/",
"https://en.wikipedia.org/wiki/Jeff_Bezos",
"https://www.britannica.com/money/Jeff-Bezos"
]
}
}
]
}
Congratulations! You've successfully received real-time, accurate information in response to your query, complete with authoritative source references for verification. It can sometimes happen that no sources are returned. This happens when the AI cannot provide a reliable and fact-based answer. In addition, the number of links varies between 0 and 5.
Models and Pricing
Available Models
CamoCopy provides a comprehensive suite of state-of-the-art language models tailored to diverse requirements and budget considerations. Our hosted models are meticulously optimized for specific task domains and complexity levels. Please note that real-time information retrieval capabilities are only available when appending either "-online" or "-deep" suffixes to the model identifier in your requests. Most models in our current ecosystem do not include vision processing capabilities, with the exception of Pixtral, which is available exclusively through special access authorization upon formal request.
Model Overview
Model | Description | Max Context | Strengths |
---|---|---|---|
llama-3.3-70b (Llama 3.3 70B) |
Our flagship enterprise-grade model offering comprehensive knowledge across a wide spectrum of domains, with nuanced understanding and sophisticated problem-solving capabilities. Engineered specifically for complex enterprise applications and document analysis requiring advanced analytical processing. Developed as an open-source model by Meta. | 128K tokens | (Recommended as the default option for most use cases) Superior domain knowledge, enterprise-caliber code generation, sophisticated creative writing, comprehensive document analysis, and advanced multi-step problem decomposition |
llama-3.1-8b (Llama 3.1 8B) |
A highly optimized lightweight model delivering exceptional performance-to-size ratio. Ideal for applications requiring balanced computational efficiency and intellectual capability. Developed as an open-source model by Meta. | 128K tokens | Resource-efficient content generation, expedited summarization capabilities, practical assistant functionalities, and optimal deployment in computationally constrained environments |
deepseek-r1-70b (DeepSeek R1) |
Specialized reasoning-focused model featuring transparent thought processes. Uniquely provides <think> blocks that demonstrate its complete reasoning chain before delivering final responses. Developed as an open-source model by DeepSeek. | 128K tokens | Transparent decision-making methodology, meticulous step-by-step problem-solving, sophisticated mathematical reasoning, and comprehensive logical analysis with fully visible inference chains | pixtral-12b-2409 (Pixtral 12B) |
A sophisticated multilingual multimodal model that effectively processes both textual and visual content despite its relatively compact architecture. Exceptionally well-suited for diagram interpretation, textual element identification within images, and comprehensive visual analysis. Available exclusively through formal request and approval process. Developed as an open-source model by Mistral. | 128K tokens | Advanced image comprehension and analysis, precise visual element recognition, detailed diagram interpretation, cross-modal reasoning between text and images, and efficient document visual parsing with modest computational requirements |
Pricing
Our pricing is based on the number of tokens processed and if -online or -deep is extended to the model's names to trigger online web search and enrich data with sources and up to date data and knowledge. We charge separately for input tokens (prompts) and output tokens (completions).
Model | Input (per million tokens) | Output (per million tokens) |
---|---|---|
llama-3.3-70b | €0.80 | €0.80 |
llama-3.1-8b | €0.20 | €0.20 |
deepseek-r1-70b | €8.00 | €8.50 |
pixtral-12b-2409 (REQUEST ACCESS) | €0.35 | €0.35 |
In addition to costs for input and output tokens, web access includes additional costs per request depending on the depth and scope of the information retrieval.
Model Suffix | Price (per 1,000 requests) |
---|---|
-online | €6.00 |
-deep | €12.00 |
Vision models, also known as multimodal models, have an additional cost for each image processed. The table below details the per-image pricing. For example, a request containing two images will be billed as two separate image analyses. Requests with no images will not incur any image analysis charges.
Model | Price (per image) |
---|---|
pixtral-12b-2409 | €0.001 |
Token Counting
A token is a chunk of text that our models process. For English text, a token is approximately 4 characters or 0.75 words. This means:
- 1,000 tokens ≈ 750 words
- 100,000 tokens ≈ 75,000 words
Example Cost Calculation
Let's say you're using llama-3.1-8b and your application processes:
- 6 million input tokens per month
- 2 million output tokens per month
Your monthly cost would be:
- Input: 6 × €0.20 = €1.20
- Output: 2 × €0.20 = €0.40
- Total: €1.60 per month
Usage Limits
By default, new accounts have the following limits:
- Maximum of 50 RPM (requests per minute)
- Maximum of 100,000 TPM (tokens per minute)
If the rate limit is reached, an error 429 is returned. Need higher limits? Add more credit to your API account via the CamoCopy API dashboard to increase your rate limits. Check your dashboard for details.
- -online
- -deep
License Information
DeepSeek R1 (deepseek-r1-70b)
The code repository and model weights for DeepSeek R1 are governed by the MIT License, permitting commercial use. This license allows for modifications and the creation of derivative works, such as distilling the model to train other large language models. Please be aware that DeepSeek-R1-Distill-Llama-70B is derived from Llama 3.3-70B-Instruct and is subject to the original Llama 3.3 license.
Llama 3.3 70B (llama-3.3-70b)
This model is available under a specific commercial license. You can find the full Llama 3.3 License Agreement here: Llama 3.3 License Agreement.
Pixtral 12B (pixtral-12b-2409)
Pixtral 12B is licensed under the Apache License, Version 2.0. This open license permits usage and modification for both commercial and non-commercial applications. Review the full terms here: Apache 2.0 License.