# Can an AI Agent Call My Own Model? | FlyMy.AI

> Package a custom Python model, deploy its endpoint and verify the request contract before adding it to an agent workflow.

Page: https://flymy.ai/use-cases/deploy-custom-model/

Your model behind a tested inference endpoint

# Deploy your own model for an AI agent

An agent can call a custom model after you deploy and verify an inference endpoint it can reach through the supported model workflow. Package the model with the FlyMy.AI CLI, declare inputs and outputs, and test a small request first. Confirm GPU availability, model compatibility and scaling behavior before promising production latency or cost.

[Build this agent](https://app.flymy.ai/signup) [Read the recipe](https://flymy.ai/use-cases/deploy-custom-model/#recipe)

## Can an AI agent call my own model?

1. ### Check the model and resource requirements Identify the model weights, license, dependencies, GPU memory and expected input size. A fine-tuned Stable Diffusion model or LoRA needs its actual compatibility verified; this guide does not establish support for every checkpoint or adapter.
2. ### Initialize and implement the Python model Use the documented CLI commands below. Load weights in initialize and perform one inference in predict. Keep the declared input/output types within the current CLI contract. The current documentation says predict accepts and returns plain dictionaries.
3. ### Authenticate and deploy Follow the CLI authentication guide and deploy from the initialized project. Inspect the resulting metadata and endpoint schema. Keep credentials out of committed model files and published examples.
4. ### Verify a small request, then connect the agent Confirm one real inference, its output and resource usage before adding the endpoint to an agent. Discover the supported model call contract and current price. Verify scale-to-zero and cold-start behavior for this deployment before relying on them.

Install the documented custom-model CLI - [source documentation](https://docs.flymy.ai/cli/intro)

```
pip install git+https://github.com/flymyai/fma-custom-models.git
```

Run in your chosen Python environment, then follow the CLI documentation.

Initialize the documented project structure - [source documentation](https://docs.flymy.ai/cli/intro)

```
mkdir my-project && cd my-project
fma init my_model
```

Implement model.py and review metadata.yaml before deploying.

Deployment command excerpt - [source documentation](https://docs.flymy.ai/cli/intro)

```
fma deploy
```

Authenticate using the documented CLI flow first. This command is copied from the deployment step; it is not evidence that the model has been deployed.

## What you get

Illustrative output - example data

```
model: your deployed endpoint
input: a schema-valid sample request
status: completed after verification
output: declared model result
agent_step: use the verified endpoint contract
```

### Where the result goes

Return the declared inference output to the calling application or agent. Image, audio and file fields have documented types; choose an explicit delivery or storage step if the result must leave the execution.

## Cost and operating limits

GPU time, model size, dependency loading and request payloads affect resource usage. Measure startup, peak memory and inference latency on the chosen configuration. [[FACT NEEDED: verified LoRA/checkpoint compatibility, GPU selection, scale-to-zero policy, cold-start latency and price for the specific custom model.]]

[Check current pricing](https://flymy.ai/pricing/)

## Choose the right approach

**Implementation choices for this job**

| Approach | What to evaluate |
|---|---|
| A custom FlyMy.AI model | Use when your reviewed weights and inference code need an endpoint that the agent can call. Verify the actual deployment contract. |
| An existing catalog model | Useful when a listed model already meets the job, so you do not need to maintain weights and packaging. |
| Your own GPU service | Useful when you want to operate the deployment, scaling, authentication and resource monitoring yourself. |

## Frequently asked questions

**Does this support every Stable Diffusion model or LoRA?**

No universal compatibility claim is made here. Verify the selected weights, adapter, dependencies and GPU memory with a real sample.

**Does serverless mean zero cost whenever idle?**

Confirm the current scaling and billing policy for the specific deployment. This guide does not promise zero idle cost or a fixed cold-start time.

**Should initialize load the weights on every request?**

The documented initialize method prepares the model when its container starts; predict handles inference requests. Keep the request path bounded and measure its memory use.

## Related jobs

Use case

### [Create AI agent by describing it](https://flymy.ai/use-cases/create-ai-agent-by-describing-it/)

Turn a plain-English job into a cloud agent, review a real run, and freeze the accepted workflow for reuse.

[Read the guide →](https://flymy.ai/use-cases/create-ai-agent-by-describing-it/)

Use case

### [Bulk image generation API](https://flymy.ai/use-cases/bulk-image-generation/)

Plan a CSV-to-images workflow with a tested generation step, bounded concurrency and per-row execution records.

[Read the guide →](https://flymy.ai/use-cases/bulk-image-generation/)

## Sources

[Custom-model CLI](https://docs.flymy.ai/cli/intro), [Model discovery and execution](https://flymy.ai/skill.md), [Pricing](https://flymy.ai/pricing.md)

Sources checked 2026-10-23. Examples are documentation excerpts, not a claim that a paid run has been performed.

---

For agents: the FlyMyAI operating guide (sign up, connect, run models, tools and agents) is https://flymy.ai/skill.md, and https://flymy.ai/llms.txt lists the other pages and the documentation.
